Skip to main content
Srinija_N
Adobe Champion
Adobe Champion
Nov 19, 2024 10:59 AM UTC
Solved

Split a date field into YYYY-MM or YYYY format

I have a date field in the general format MM-DD-YYYY. Now I need two new fields out of it in YYYY-MM and YYYY format. Can this be done via text mode view?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Srinija_N
Srinija_NAccepted solution
Adobe Champion
Nov 19, 2024 2:49 PM UTC

I was able to find the text mode by myself anyway.

YYYY/MM:

valueexpression=CONCAT(YEAR({lastLoginDate}), '/', MONTH({lastLoginDate}))

 

YYYY format:

valueexpression=YEAR({lastLoginDate})

 

and also found the below for any other formats.

Format Example valueformat=

MM/DD/YY10/11/18atDate
MM/DD/YY Time10/11/18 12:00pmlongAtDate
MM/DD/YY10/11/18shortAtDate
Mth, DD, YROct, 11, 2018mediumAtDate
DW, Mth, Day, YRMon, Oct, 11, 2018partialAtDate
DW, Mth, Day, YR TimeMon, Oct, 11, 2018 12:00 pmfullAtDate
Srinija N

5 replies

Madalyn_Destafney
Community Advisor
Community Advisor
Nov 19, 2024 2:02 PM UTC

Are you wanting to show the date fields in columns in a report? If so, you pull in the date field into your column and then in the advanced options of that column, you can select how you want the date field to appear/format.

Translate
If this helped you, please mark correct to help others : )
Srinija_N
Adobe Champion
Srinija_NAdobe ChampionAuthor
Adobe Champion
Nov 19, 2024 2:46 PM UTC

There is no option to change the format in the advance options of the field. (May be due to the field is Standard)

Translate
Srinija N
Madalyn_Destafney
Community Advisor
Community Advisor
Nov 19, 2024 3:08 PM UTC

Hm interesting. When you have the date field in a report column > advanced options > you should see this dropdown.

 

Translate
If this helped you, please mark correct to help others : )
Srinija_N
Adobe Champion
Srinija_NAdobe ChampionAuthorAccepted solution
Adobe Champion
Nov 19, 2024 2:49 PM UTC

I was able to find the text mode by myself anyway.

YYYY/MM:

valueexpression=CONCAT(YEAR({lastLoginDate}), '/', MONTH({lastLoginDate}))

 

YYYY format:

valueexpression=YEAR({lastLoginDate})

 

and also found the below for any other formats.

Format Example valueformat=

MM/DD/YY10/11/18atDate
MM/DD/YY Time10/11/18 12:00pmlongAtDate
MM/DD/YY10/11/18shortAtDate
Mth, DD, YROct, 11, 2018mediumAtDate
DW, Mth, Day, YRMon, Oct, 11, 2018partialAtDate
DW, Mth, Day, YR TimeMon, Oct, 11, 2018 12:00 pmfullAtDate
Translate
Srinija N