LISTSERV Maestro 11.0-20 Help Table Of Contents

Calculation Formulas

Back to Calculation Formulas Overview
Back to Functions Overview


Function "LastMidnightMillis"

LastMidnightMillis[(timezone)]

Function: Returns the date/time of the most recent midnight in the given timezone, represented in milliseconds since "Jan. 1st 1970, 00:00:00 GMT".
Or in other words: It takes the current timestamp relative to the given timezone, and clears all time components to 00:00h, so that the remaining timestamp represents the date of today in the given timezone, without any time components.
No argument given: The timezone "GMT" is used.
One argument given: The given timezone is used. Please see here for possible timezone values.

Return-Type: Number

Arguments: (The argument is optional)
timezone - Type Text: The ID or value of the timezone for which the midnight shall be determined. See here for possible timezone values.

Examples:
LastMidnightMillis("EST")
(if executed at "Dec 7th, 2011, 08:12h EST", it returns a milliseconds value that represents "Dec 7th, 2011, 00:00h EST", which is equal to "Dec 7th, 2011, 06:00h GMT")

LastMidnightMillis
(if executed at "Nov 11th, 2011, 11:06h GMT", it returns a milliseconds value that represents "Nov 11th, 2011, 00:00h GMT")

© 2002-2023 L-Soft Sweden AB. All rights reserved.