cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Nintex Newbie

How to format a date in an o365 workflow?

Jump to solution

How do I format a datetime in a 0365 workflow.

I tried the:

fn-FormatDate({Current Item:MyDate}‍, "yyMMdd")

But that just outputs:  fn-FormatDate(6/1/2019 3:45:00 PM, "yyMMdd") 

I know there are the insert options to select ISOFormatted, Long/Short Date/Time but none of those work for the format I need.   ISO is the closest, but since it returns the value in GMT the date/time can appear to be off to users (since they don't expect GMT)

 

As an added wrinkle I need it in 24hr time.

 

Any suggestions?   

Labels: (1)
0 Kudos
Reply
2 Replies
Highlighted
Nintex Newbie

Re: How to format a date in an o365 workflow?

Jump to solution

So the best solution I could come up with is to use regex and extract the digets from the datetime as string (/d+)   then I created a parallel process to pad with 0's  and change the hours to 24hr time (based on AM/PM) and then finally did a string builder to combine all the values in the order I wanted.

And extra 20+ actions but it works.

View solution in original post

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: How to format a date in an o365 workflow?

Jump to solution

Has anyone found another way? i tried the regex to pull the year of a variable date but when i combine it with my other variables it shows up with a bracket and quotes. ex ["2019"] instead of just the number. 

 

i used this - (\d\d)\w+

date: 9/17/2019 12:25:23 PM

0 Kudos
Reply