Converts string to date. Useful when date or datetime comes from an external resource (e.g. API or from the webhook) and it is needed to set the date in a Sugar date/datetime field according to Sugar date/datetime format.
inputs:
string – link with a string that represents the date
- Required: yes
format – specify the format of the date in string. The full list of allowed date formats you can find here.
- Required: yes
Most common formats:
When the date looks like this…. | …use this format |
2021-11-27 23:04:13 | Y-m-d H:i:s |
27/11/2021 17:45:12 | d/m/Y H:i:s |
27/11/21 | d/m/y |
5:45pm on Thursday 25th November 2021 | g:ia \o\n l jS F Y |
1637849455 | u |
is in user’s timezone – set to ‘Yes’ if resulting date must be converted to the current Sugar user’s time zone settings.
- Required: yes
outputs:
date – date created from the string using the specified format in user’s timezone or as is.
Click to rate this post!
[Total: 0 Average: 0]