DEV Community

El Bruno for Microsoft Azure

Posted on โ€ข Originally published at elbruno.com on

5

#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.


Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where youโ€™ll build it, break it, debug it, and fix it. Youโ€™ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good olโ€™ AI to find and fix issues fast.

RSVP here โ†’

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs