Summary
DateAdd()
DateDiff()
DateParse()
DatePart()
FormatDate()
GetSendTime()
LocalDateToSystemDate()
Now()
StringToDate()
SystemDateToLocalDate()
DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!
Let us know so we can improve!
Returns a formatted date from a date string.
| Marketing Cloud Engagement | ✅ Yes |
| Marketing Cloud Next | ✅ Yes, with some differences |
This function became available in Marketing Cloud Next during the Summer ’26 release (API version 67.0).
In Marketing Cloud Engagement, this function returns a dateTime object that other functions can reformat.
In Marketing Cloud Next, this function returns a string formatted with the G standard format. This format uses a combination of a short date value and a long time value. For example, in the en_US locale, this function outputs a timestamp that’s similar to this example: 5/15/2026 1:23:45 PM. Because the output is a string and is formatted based on locale rules, you can’t reliably pass it through other functions that expect a date-time string, such as FormatDate(). If your use case requires you to parse and then format a date, use FormatDate() instead.
1DateParse(dateString, boolUseUtc)The DateParse() function has two parameters:
dateString (string): Required. A string that contains a date or timestamp.boolUseUtc (boolean): If true, the function returns the date and time in UTC time. If false, the function uses the local time defined by your Business Unit. The default value is false.You can specify a date string in several formats, including:
2023-08-05T13:41:23-06:002023-08-058/5/2023 1:41 PM5 August 2023 or August 5, 20232023-08-05 1:41:23 PM1:41 PM2023 年 8 月 5 日2023년 8월 5일The function doesn’t support these formats:
August 5th, 2023 or 5th August 2023.5/8/2023 to represent the 5th of August, 2023.5 août 2023.٢٠٢٣/٨/٥.18 Av, 5783 or 18 Muharram, 1445.This example prints the current time in UTC.
1%%[
2 Var @now, @nowUtc
3 Set @now = Now()
4 Set @nowUtc = DateParse(@now, true)
5
6]%%
7<p>The current UTC time is: %%=v(@nowUtc)=%%.</p>