cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Lewkir
Level: Powered On

Long Date Format

Quick quesiton which I'd have thought wouldn't be that hard but has stumped me so far.

 

How do I format a date so it appears like: "1st Janurary 2019"?

 

Thanks,

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Long Date Format

Hi @Lewkir ,

 

Please try this format:

d MMMM yyyy

It seems that the date of the format "1st" is more complicated, and the use of numbers seems to basically meet your needs.

74.PNG

utcNow('d MMMM yyyy')
formatDateTime('2019-07-01','d MMMM yyyy')

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Super User
Super User

Re: Long Date Format

@Lewkir 

Hi there!  I think it's the ordinal indicator ('st') that's complicating things.  I don't think it's part of the standard, but it doesn't mean it's impossible.  Essentially, you'd want to break the date number off, look at the last digit and build a switch:

If the last digit is a 1, then set the indicator to 'st'

If the last digit is a 2, then set it to 'nd'

If it's 3, then set it to 'rd'

otherwise, set it to 'th'

And then piece together the date as a concatenated string to present wherever you'd like.

 

We can do all of this without code, or there's probably a way to do it with an expression or two.  What's your comfort level like?  Keep us posted.

 

-Ed-

 

 

If this reply has answered your question or resolved your challenge, please consider marking it as a Solution. This helps other users find it more easily via search.

Community Support Team
Community Support Team

Re: Long Date Format

Hi @Lewkir ,

 

Please try this format:

d MMMM yyyy

It seems that the date of the format "1st" is more complicated, and the use of numbers seems to basically meet your needs.

74.PNG

utcNow('d MMMM yyyy')
formatDateTime('2019-07-01','d MMMM yyyy')

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Lewkir
Level: Powered On

Re: Long Date Format

Cheers, after re-reading the email I've realised I only needed the format 1 January 2019 so this will suffice.

 

Thanks for your help.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (4,868)