#Azure – Formatting Date Time ๐Ÿ“… in Logic Apps or Power Automate โœ…

Hi !

Everytime I need to format a date in a LogicApp or in Power Automate I start from scratch; so it’s time to write this down.

My most common scenario is to create a string, from the current date / time, with the following format:

[Year][Month][Date][Hour][Minute][Second]

Translated to date format will be

formatDateTime(utcNow(), ‘yyyyMMddHHmmss’)

You can read more about this in

Custom date and time format strings

In example, I usually like to save log files, with this format. Save them to Azure Storage, or for testing, even to OneDrive.

create a log file in logic apps using a specific date time format for the file name

And then, the new file will have a decent and easy name !

sample files created

Happy coding!

Greetings

El Bruno

More posts in my blog ElBruno.com.


Leave a comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: