Product Documentation

Format of Dates and Times in an Expression

Nov 14, 2013

When configuring a default syntax expression in a policy that works with dates and times (for example, the NetScaler system time or a date in an SSL certificate), you specify a time format as follows:

GMT|LOCAL [<yyyy>] [<month>] [<d>] [<h>] [<m>] [<s>]


  • <yyyy> is a four-digit year after GMT or LOCAL.
  • <month> is a three-character abbreviation for the month, for example, Jan, Dec.
  • <d> is a day of the week or an integer for the date.

    You cannot specify the day as Monday, Tuesday, and so on. You specify either an integer for a specific day of the month, or you specify a date as the first, second, third weekday of the month, and so on. Following are examples of specifying a day of the week:

    • Sun_1 is the first Sunday of the month.
    • Sun_3 is the third Sunday of the month.
    • Wed_3 is the third Wednesday of the month.
    • 30 is an example of an exact date in a month.
  • <h> is the hour, for example, 10h.
  • <s> is the number of seconds, for example, 30s.

The following example expression is true if the date is between 2008 Jan and 2009 Jan, based on GMT. 2008 Jan, GMT 2009 Jan)

The following example expression is true for March and all months that follow March in the calendar year, based on GMT: 2008 Mar)

When you specify a date and time, note that the format is case sensitive and must preserve the exact number of blank spaces between entries.

Note: In an expression that requires two time values, both must use GMT or both must use LOCAL. You cannot mix the two in an expression.
Note: Unlike when you use the SYS.TIME prefix in a default syntax expression, if you specify SYS.TIME in a rewrite action, the NetScaler returns a string in conventional date format (for example, Sun, 06 Nov 1994 08:49:37 GMT). For example, the following rewrite action replaces the header with the NetScaler system time in a conventional date format:

add rewrite action sync_date replace sys.time