You are viewing limited content. For full access, please sign in.

Question

Question

Workflow - Date Formatting "M" returns month as word and day as number

asked on April 24

Why does this format return the month as a word and the day as well?

Shouldn't a single or lower or upper case M return the month as number? We tried both lower and upper case M.

Based on every document I can find and asking AI this should not be the case. It should not be returning the day or the month name, it should always be a number.

0 0

Answer

SELECTED ANSWER
replied on April 24

A single-character date/time format string will be interpreted as a standard date/time format string. Multiple-character date/time format strings will be interpreted as custom strings. To use a single-character custom string, include a % sign before the character or a space before or after it. [1]

 

Long story short add a % in front of the M ( i.e. %M )

P.S. The future is now ;)

0 0
replied on April 24

haha! 10 years later. I don't think I am going to remember this even by next year if it comes up again. I tried asking google why it was returning the month name and day and it said that it must include a d character to return a day without mentioning the need for any % prefix. If the documentation just showed a %M instead of an M it might help me copy the right input or if we could just pick from a list like we can with the regex. Thanks though!

0 0
replied on April 24

The real reason is because Microsoft implemented it like that. 

0 0
replied on April 24

But this document doesn't tell you that M will result in the month as a single digit, the other doc does.

0 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.