GetSendTime Function

The GetSendTime function returns the date/time of when a send occurs depending on the kind of send:

  • Manual sends, sends with data extension or list: Date/Time when the send started or if boolean is set to 1 then the send on the individual subscriber level
  • Triggered or Journey send: Date/Time the send is published or if boolean is set to 1 then the send on the individual subscriber level

The GetSendTime function can be used in conjunction with the UpsertData or UpsertDE function to write the results in a data extension.

Syntax:



GetSendTime(1)
1 = Use the value of 1 to indicate that the send time is not captured on the individual subscriber level. In other words, a value of 1 would return the job start time or the publish time of triggered send or journey

Example:



%%[
set @getSendtime = GetSendTime()

]%%
%%=v(@getSendtime)=%% 

Output:

2/15/2021 9:01:52 PM

Explanation:

The GetSendTime function is a good way of logging send time in conjunction with the UpsertData or UpsertDE function. In this example, the function is written as GetSendTime()without the 1 in the parenthesis so the result will show individual subscriber send completed times. This can be used in conjunction with the DateAdd function or the DateDiff function or other Date/Time functions.

Note that GetSendTime is identical to the Now function when both boolean parameters are set to 1. For example, GetSendTime(1) gives you the same result as Now(1).

Leave a Reply

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