This action will automatically turn datetime value into string of equivalent value in the specified format.
*Please note that all data time actions now have Formatted Result property using which you can format their output without needing to use this action.
Fields
Name - By default, it is prefilled by the name of the action. You can change it based on your preferred action name.
Date - The time value you want to format.
Format - The datetime format you want to recall as a string. Ex:
hh:mm:ss => 07:27:15 yyyy'-'MM'-'dd HH':'mm':'ss'Z' => 2008-04-10 13:30:00Z u => 2008-04-10 13:30:00Z MMMM dd, yyyy => June 10, 2011 MM/dd/yy H:mm:ss zzz => 06/10/11 15:24:16 +00:00
Demonstration on how to use it in a flow
Drag and drop Get Diff action into the flow.
Click the gear icon to open its settings.
The Name section is pre-filled by the action name but you can configure this section according to your preference.
The Date field is where you enter datetime value you want to format as string of equal value. You can do this by clicking the calendar icon and choosing a datetame value, or the parameter icon by choosing the right token(s).
The Format field is where you enter datetime format of the string you want to return. For a list of possible format string you can use, please see the Example Date Time formats section in this article
Result
Upon executing the flow, this action will automatically return your base datetime value as a string of equal value in your chosen format.
Example Date Time formats:
The following table shows a list of sample datetime formats you can use and their outcome. For more information you view this article.
Format specifier | Description | Examples |
"d" | The day of the month, from 1 through 31. | 2009-06-01T13:45:30 -> 1 |
"dd" | The day of the month, from 01 through 31. | 2009-06-01T13:45:30 -> 01 |
"ddd" | The abbreviated name of the day of the week. | 2009-06-15T13:45:30 -> Mon (en-US) |
"dddd" | The full name of the day of the week. | 2009-06-15T13:45:30 -> Monday (en-US) |
"f" | The tenths of a second in a date and time value. | 2009-06-15T13:45:30.6170000 -> 6 |
"ff" | The hundredths of a second in a date and time value. | 2009-06-15T13:45:30.6170000 -> 61 |
"fff" | The milliseconds in a date and time value. | 6/15/2009 13:45:30.617 -> 617 |
"ffff" | The ten thousandths of a second in a date and time value. | 2009-06-15T13:45:30.6175000 -> 6175 |
"fffff" | The hundred thousandths of a second in a date and time value. | 2009-06-15T13:45:30.6175400 -> 61754 |
"ffffff" | The millionths of a second in a date and time value. | 2009-06-15T13:45:30.6175420 -> 617542 |
"fffffff" | The ten millionths of a second in a date and time value. | 2009-06-15T13:45:30.6175425 -> 6175425 |
"F" | If non-zero, the tenths of a second in a date and time value. | 2009-06-15T13:45:30.6170000 -> 6 |
"FF" | If non-zero, the hundredths of a second in a date and time value. | 2009-06-15T13:45:30.6170000 -> 61 |
"FFF" | If non-zero, the milliseconds in a date and time value. | 2009-06-15T13:45:30.6170000 -> 617 |
"FFFF" | If non-zero, the ten thousandths of a second in a date and time value. | 2009-06-15T13:45:30.5275000 -> 5275 |
"FFFFF" | If non-zero, the hundred thousandths of a second in a date and time value. | 2009-06-15T13:45:30.6175400 -> 61754 |
"FFFFFF" | If non-zero, the millionths of a second in a date and time value. | 2009-06-15T13:45:30.6175420 -> 617542 |
"FFFFFFF" | If non-zero, the ten millionths of a second in a date and time value. | 2009-06-15T13:45:30.6175425 -> 6175425 |
"g", "gg" | The period or era. | 2009-06-15T13:45:30.6170000 -> A.D. |
"h" | The hour, using a 12-hour clock from 1 to 12. | 2009-06-15T01:45:30 -> 1 |
"hh" | The hour, using a 12-hour clock from 01 to 12. | 2009-06-15T01:45:30 -> 01 |
"H" | The hour, using a 24-hour clock from 0 to 23. | 2009-06-15T01:45:30 -> 1 |
"HH" | The hour, using a 24-hour clock from 00 to 23. | 2009-06-15T01:45:30 -> 01 |
"K" | Time zone information. | With DateTime values: |
"m" | The minute, from 0 through 59. | 2009-06-15T01:09:30 -> 9 |
"mm" | The minute, from 00 through 59. | 2009-06-15T01:09:30 -> 09 |
"M" | The month, from 1 through 12. | 2009-06-15T13:45:30 -> 6 |
"MM" | The month, from 01 through 12. | 2009-06-15T13:45:30 -> 06 |
"MMM" | The abbreviated name of the month. | 2009-06-15T13:45:30 -> Jun (en-US) |
"MMMM" | The full name of the month. | 2009-06-15T13:45:30 -> June (en-US) |
"s" | The second, from 0 through 59. | 2009-06-15T13:45:09 -> 9 |
"ss" | The second, from 00 through 59. | 2009-06-15T13:45:09 -> 09 |
"t" | The first character of the AM/PM designator. | 2009-06-15T13:45:30 -> P (en-US) |
"tt" | The AM/PM designator. | 2009-06-15T13:45:30 -> PM (en-US) |
"y" | The year, from 0 to 99. | 0001-01-01T00:00:00 -> 1 |
"yy" | The year, from 00 to 99. | 0001-01-01T00:00:00 -> 01 |
"yyy" | The year, with a minimum of three digits. | 0001-01-01T00:00:00 -> 001 |
"yyyy" | The year as a four-digit number. | 0001-01-01T00:00:00 -> 0001 |
"yyyyy" | The year as a five-digit number. | 0001-01-01T00:00:00 -> 00001 |
"z" | Hours offset from UTC, with no leading zeros. | 2009-06-15T13:45:30-07:00 -> -7 |
"zz" | Hours offset from UTC, with a leading zero for a single-digit value. | 2009-06-15T13:45:30-07:00 -> -07 |
"zzz" | Hours and minutes offset from UTC. | 2009-06-15T13:45:30-07:00 -> -07:00 |
":" | The time separator. | 2009-06-15T13:45:30 -> : (en-US) |
"/" | The date separator. | 2009-06-15T13:45:30 -> / (en-US) |
"string" | Literal string delimiter. | 2009-06-15T13:45:30 ("arr:" h:m t) -> arr: 1:45 P |
% | Defines the following character as a custom format specifier. | 2009-06-15T13:45:30 (%h) -> 1 |
\ | The escape character. | 2009-06-15T13:45:30 (h \h) -> 1 h |
Any other character | The character is copied to the result string unchanged. | 2009-06-15T01:45:30 (arr hh:mm t) -> arr 01:45 A |