How to get the month name or number from a date

Hello,

I am trying to get only the number or the name of the month from a date. For example,
if the date is ‘1/1/2023’ then it will get 1 or Jan.

Thanks

You can use date time token with formatDate to get the desired outcome.

For eg; If you want to get January then you can do,

formatDate(date;MMMM)

To get number,

formatDate(date;M)

More info here.

PS. If your date is a string, you will first need to use parseDate.

Screenshot from 2023-06-20 19-42-20

4 Likes