Get Date From String

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:13Y-m-d H:i:s
27/11/2021 17:45:12d/m/Y H:i:s
27/11/21d/m/y
5:45pm on Thursday 25th November 2021g:ia \o\n l jS F Y
1637849455u

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]

Leave a Reply

Your email address will not be published. Required fields are marked *