Now
→ stringReturns the current date and time of the SFMC server as a string.
Available in:
Email
CloudPage
Automation
Triggered Send
Syntax
Platform.Function.Now([useContextTime])
0–1 arguments
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
useContextTime |
boolean | No | When true, returns the time the triggering send or activity was initiated. When false or omitted, returns the current system clock time. |
Description
Returns the current server date/time as a string in a format like "3/30/2026 2:45:23 PM". The time is in the SFMC account’s configured timezone.
Examples
var now = Platform.Function.Now();
Write("Server time: " + now);
// Store a timestamp in a DE
Platform.Function.InsertData("Log", "Timestamp", Platform.Function.Now(), "Event", "page_view");
// Use with DateAdd for expiry calculations
function dateAdd(timestamp,intervalToAdd,intervalType) {
Platform.Variable.SetValue("@dateAdd_ts",timestamp);
Platform.Variable.SetValue("@dateAdd_add",intervalToAdd);
Platform.Variable.SetValue("@dateAdd_type",intervalType);
return Platform.Function.TreatAsContent("%%=DateAdd(@dateAdd_ts, @dateAdd_add, @dateAdd_type)=%%");
}
var expiry = dateAdd(Now(), 30, "D");
Write("Expires: " + expiry);
Notes
For time-sensitive calculations, note that Now() returns the SFMC server time (Central time by default, unless configured otherwise). It does not return the subscriber’s local time — use SystemDateToLocalDate() for that.