Hello,
I currently wanted to construct a workflow that pulls in the last month as a number without a leading zero.
I came up with this:
(DateTimeFormat(DateTimeAdd(DateTimeFirstOfMonth(),-1,"months"),"%m")
However I want to get rid of the leading zero.
Solved! Go to Solution.
@mestra28 the TrimLeft function will be useful in this use case
TrimLeft( DateTimeFormat(DateTimeAdd(DateTimeFirstOfMonth(),-1,"months"),"%m"),'0')
@mestra28
you mentioned that you want a number, so use ToNumber function to convert the string to number will natually remove the leading zero.
@binuacsThis worked, thank you!