Dear community,
The Format Value activity helps us to format a generic value into more that 30+ datetime formats, without being necessary to write any VB or C# code.
2. How your formatted values looks for different datetime patterns?
Patern | Output Value |
---|---|
MM/dd/yyyy | 10/18/2022 |
yyyy-MM-dd | 2022-10-18 |
dddd, dd MMMM yyyy | Tuesday, 18 October 2022 |
dddd, dd MMMM yyyy HH:mm | Tuesday, 18 October 2022 14:29 |
dddd, dd MMMM yyyy hh:mm tt | Tuesday, 18 October 2022 02:29 PM |
dddd, dd MMMM yyyy H:mm | Tuesday, 18 October 2022 14:29 |
dddd, dd MMMM yyyy h:mm tt | Tuesday, 18 October 2022 2:29 PM |
dddd, dd MMMM yyyy HH:mm:ss | Tuesday, 18 October 2022 14:29:22 |
MM/dd/yyyy HH:mm | 10/18/2022 14:29 |
MM/dd/yyyy hh:mm tt | 10/18/2022 02:29 PM |
MM/dd/yyyy H:mm | 10/18/2022 14:29 |
MM/dd/yyyy h:mm tt | 10/18/2022 2:29 PM |
yyyy-MM-dd HH:mm | 2022-10-18 14:29 |
yyyy-MM-dd hh:mm tt | 2022-10-18 02:29 PM |
yyyy-MM-dd H:mm | 2022-10-18 14:29 |
yyyy-MM-dd h:mm tt | 2022-10-18 2:29 PM |
MM/dd/yyyy HH:mm:ss | 10/18/2022 14:29:22 |
yyyy-MM-dd HH:mm:ss | 2022-10-18 14:29:22 |
MMMM dd | October 18 |
yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK | 2022-10-18T14:29:22.5432798+03:00 |
ddd, dd MMM yyyy HH':'mm':'ss 'GMT' | Tue, 18 Oct 2022 14:29:22 GMT |
yyyy'-'MM'-'dd'T'HH':'mm':'ss | 2022-10-18T14:29:22 |
HH:mm | 14:29 |
hh:mm tt | 02:29 PM |
H:mm | 14:29 |
h:mm tt | 2:29 PM |
HH:mm:ss | 14:29:22 |
yyyy'-'MM'-'dd HH':'mm':'ss'Z' | 2022-10-18 14:29:22Z |
dddd, dd MMMM yyyy HH:mm:ss | Tuesday, 18 October 2022 14:29:22 |
yyyy MMMM | 2022 October |
3. What is the meaning of a selected format specifier from your datetime pattern?
Format specifier | Description | Example |
---|---|---|
dd | The day of the month, from 01 through 31. | 14 |
ddd | The abbreviated name of the day of the week. | Tue |
dddd | The full name of the day of the week. | Tuesday |
fffffff | The ten millionths of a second in a date and time value. | 5432798 |
h | The hour, using a 12-hour clock from 1 to 12. | 2 |
hh | The hour, using a 12-hour clock from 01 to 12. | 02 |
H | The hour, using a 24-hour clock from 0 to 23. | 14 |
HH | The hour, using a 24-hour clock from 00 to 23. | 14 |
K | Time zone information. | +03:00 |
mm | The minute, from 00 through 59. | 29 |
MM | The month, from 01 through 12. | 10 |
MMM | The abbreviated name of the month. | Oct |
MMMM | The full name of the month. | October |
ss | The second, from 00 through 59. | 22 |
tt | The AM/PM designator. | PM |
yyyy | The year as a four-digit number. | 2022 |
: | The time separator. | : |
/ | The date separator. | / |
Any other character | The character is copied to the result string unchanged. | GMT; Z |
References:
-
Format Value activity: https://docs.uipath.com/activities/docs/format-value
-
.Net - Custom date and time format strings https://learn.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings
Happy automation!