Skip to main content
Solved

Converting partial year and text to year/month

  • March 10, 2024
  • 1 reply
  • 20 views

Forum|alt.badge.img+3

Hello! 

I have a large set of dates that are a partial year and month, and would like to convert this to a final date of the month format. Examples:

Data I HaveDesired Format
24-Apr2024-04-30
24-Aug2024-08-30
23-Dec2023-12-31

I've tried concat using LEFT( & RIGHT(

I'd like to try SUBSTITUTE, but not sure of the formatting. I'm also open to any suggestions

Thanks for your time! 

Best answer by Sho

Hello @betteratuno,

This is how to parse the date and get the end of the month

DATEADD(DATEADD(DATETIME_PARSE({DateText},"YY-MMM"), 1, "Months"), -1, "Days")

 

1 reply

Forum|alt.badge.img+21
  • Inspiring
  • Answer
  • March 10, 2024

Hello @betteratuno,

This is how to parse the date and get the end of the month

DATEADD(DATEADD(DATETIME_PARSE({DateText},"YY-MMM"), 1, "Months"), -1, "Days")