Now Function

The Now function returns the current server date and time (in Central Standard Time without daylight savings observed). Similar functions include LocalDateToSystemDate and the SystemDateToLocalDate function.

Use the GetSendTime function instead of Now when returning the date/time of when a send occurs to get individual subscriber level send time.

The Now function can be used in conjunction with the DateAdd function or the DateDiff function or other Date/Time functions.

Syntax:



Now(1)
1 = Use the value of 1 to preserve email send time

Example:



%%[
var @now
set @now = Now()
set @LocalDateToSystemDate = LocalDateToSystemDate(@now)
set @SystemDateToLocalDate = SystemDateToLocalDate(@now)

]%%
Now: %%=v(@now)=%%
LocalDateToSystemDate: %%=v(@LocalDateToSystemDate)=%%
SystemDateToLocalDate: %%=v(@SystemDateToLocalDate)=%%

Output:

Now: 2/15/2021 11:04:46 PM 
LocalDateToSystemDate: 2/15/2021 10:04:46 PM 
SystemDateToLocalDate: 2/16/2021 12:04:46 AM

Explanation:

See the differences in time between the Now function, the LocalDateToSystemDate function and the SystemDateToLocalDate function. LocalDateToSystem date takes the date/time value of “2/15/2021 11:04:46 PM” and subtracts and hour, where as SystemDateToLocalDate adds an hour.

If the Now(1) function is used with the optional boolean of “1” and if this function is used in an email send, it will preserve the send time of when the email is sent. Note that for triggered sends, the date/time used will be when the triggered send is published.

Leave a Reply

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