Riverwatcher Active Content Environment

RACE Documentation:


RACE Documentation DATE - Date and time formatting and mathematics. Returns the current date or a specific date in the format specified.



  • FORMAT - the format to returning the date (see table below) - "yyyy-MM-dd HH:mm:ss" is the default
  • COOKIE - automatically chooses the cookie-compatible date format
  • VALUE - an optional attribute to specify a particular date/time
  • YEAR - an integer value to increment/decrement years
  • MONTH - (also MON) an integer value to increment/decrement months
  • DAY - an integer value to increment/decrement days
  • HOUR - an integer value to increment/decrement hours
  • MINUTE - (also MIN) an integer value to increment/decrement minutes
  • SECOND - (also SEC) an integer value to increment/decrement seconds
Format arguments
Field Long form Short form
Year yyyy (4 digits) yy (2 digits)
Month MMMM (name) MMM (abbrev.)
MM (2 digit)
M (1-2 digit)
Day of Week EEEE (full day name)
EEE (3 letter abbreviation)
EE
Day of Month dd (2 digit) d (1-2 digit)
Hour (1-12) hh (2 digit) h (1-2 digits)
Hour (0-23) HH (2 digit) H (1-2 digit)
Minute mm (2 digit) m (1-2 digit)
Second ss (2 digit) s (1-2 digit)
Epoch Seconds S  
AM/PM A  
am/pm a  
A.M./P.M. AA  
a.m./p.m. aa  
Time Zone zzzz  
Day in Year DDD (3 digit) D (1-3 digit)
Week Number VV (2 digit) V (1-2 digit)
Year of Week Number XXXX (4 digit) XX (2 digit)
 
Note: to use a string literal in the formatstring, escape it with a backslash (\).


Assuming the current date/time is 12:18:32 PM, 20 May 2003
ExampleReturns
<date>2003-05-20 12:18:32 (MySQL default format)
<date format="yyyy-MM-dd HH:mm:ss">2003-05-20 12:18:32 (MySQL default format)
<date format="dd MMM, yyyy - h:m A">20 May, 2003 - 12:18 PM
<date format="yyyy-MM-dd HH:mm:ss" day="-7">2003-05-13 12:18:32
<date format="S">1053451112
<date format="EEEE h:mm A">Tuesday 12:18 PM
<date format="d\t\h \o\f MMM">20th of May
<date format="V">21 (The week number in the year of the date)
<date format="XXXX">2003 (The year corresponding to the week number)
<date cookie>Tue, 20-May-2003 12:18:32 GMT




RACE Documentation



 
Copyright 2009 Riverwatcher, Inc. Hosting by Riverwatcher Studios