Need Month Name (text) and Year from Date

I have column which has date in this format “4 January 2024 at 12:47”

I need the Value of Month (Text) , Year in a column with name “Month” meaning I should be able to extract Month name and Year into column “Month”

In the above example it should read January, 2024.

I know how to extract it separately in two different columns. Is there any simpler way / math formula to compute and put value in same cell?

Thank you guys in Advance,

Regards,
Dilip

Tried with JS and not sure if there’s a better way!

image


2 Likes

thank you Dilon :slight_smile:

Please check if this works on iOS/MacOS. I have used Date functions on Safari before and it did fail a few times.

1 Like

Yeah, I agree with @ThinhDinh. JavaScript and/or the Format Date column both work perfectly fine most of the time. But under some circumstances both can fail on Safari. And when they do, it can be a PITA to try and figure out what went wrong.

I always use Math columns for this sort of stuff. Year(Date) to get the Year, then Month(Date)-1 to get the Month Index, followed by a Single Value to get the Month Name. It’s a bit more work, but I’ve never seen this method fail.

2 Likes

Hi Darren,

thank you for the reply. then how would you combine them?

I need it like January, 2024

Regards,
Dilip

With a template column.

You do this operation in two different columns, then template both columns to get output?

I am little confused how would it work?

Regards,
Dilip

Here is an example:

  • Month: Obvious. (Usually I would have this in a separate Lookup table)
  • Date: Obvious
  • Year: Math column - Year(Date)
  • MonthIndex: Math column - Month(Date) - 1
  • MonthName: Single Value column. X from Start of Month, where X is MonthIndex
  • Formatted: Template column, joining MonthName & Year
1 Like

can you show me how your Formatted column (template) values look? I mean config

regards,
Dilip

I just saw Darren’s and Thinh’s replies and I believe what Darren suggest is like this! : 20240207184131.mp4 - Google Drive

3 Likes

Thank you Darren :slight_smile:

Thank you Dilon :slight_smile:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.