DATE_TO_SECONDS |
Returns the specified date as seconds. This function parses and converts any
standard date or time value. If you specify only the time, the function uses
the current date as the default.
Note:
Function uses the date 1970-01-01 as anchor. Any date prior to 1970-01-01
will return a negative value.
- Syntax
-
DATE_TO_SECONDS("date")
where date is the date value to be calculated in seconds.
Choose from the following valid date formats:
- HH:MM:SS M/D/YYYY
- HH:MM M/D/YYYY
- HH:MM AM/PM M/D/YYYY
- M/D/YYYY HH:MM:SS
- M/D/YYYY HH:MM
- M/D/YYYY HH:MM AM/PM
- M/D/YY
- M/D/YYYY
- D-Mon-YY
- D-Mon-YYYY
Leading zeros on single digit days and months are acceptable.
Note:
Specifying an unsupported date format returns a null value.
- Examples
-
DATE_TO_SECONDS("15:54 12/14/05") returns 1134575640.
DATE_TO_SECONDS("12/1/2005 00:01:01") returns 1133416861.
|
DAYMONTHYEAR |
Returns the specified date, given as day/month/year, in seconds.
- Syntax
-
DAYMONTHYEAR("date")
where date is the day/month/year value to be calculated in
seconds. Choose from the following valid date formats:
- D/M/YY
- D/M/YYYY
- D-M-YY
- D-M-YYYY
- D-Mon-YY
- D-Mon-YYYY
Leading zeros on single digit days and months are acceptable.
Note:
Specifying an unsupported date format returns a blank.
- Examples
-
- DAYMONTHYEAR("20/12/05") returns 1135054800.
- DAYMONTHYEAR("12-12-05") returns 1134363600.
|
MONTHDAYYEAR |
Returns the specified date, given as month/day/year, in seconds.
- Syntax
-
MONTHDAYYEAR("date")
where date is the month/day/year value to be calculated in
seconds. Choose from the following valid date formats:
- M/D/YY
- M/D/YYYY
- M-D-YY
- M-D-YYYY
Leading zeros on single digit days and months are acceptable.
Note:
Specifying an unsupported date format returns a blank.
- Examples
-
- MONTHDAYYEAR("12-12-05") returns 1134363600.
- MONTHDAYYEAR("12/12-05") returns 1134363600.
|
NOW |
Returns the current date and time as seconds.
- Syntax
-
NOW()
- Example
-
If the current date is October 12, 2006, NOW() returns
1160684002.
|
SECONDS_IN |
Calculates the number of seconds within a time period; for example, a
specified number of days, weeks, and so on.
- Syntax
-
SECONDS_IN("n_time")
where
-
n is the value that describes the specified time
(optional).
-
time is the value that indicates the time to
specify.
Use any of the following values to specify the time period: year,
fortnight, month, week, day, hour, minute (or min), second (or
sec), tomorrow, yesterday, today, now, last, this, next, and ago.
Values are not case sensitive.
- Examples
-
- SECONDS_IN("1 day") returns 86400.
- SECONDS_IN("2 weeks") returns 1209600.
|
SECONDS_TO_DATE |
Converts seconds back to the specified date/time format. Field descriptors
start with a percentage sign (%) followed by a field descriptor
character. All other characters are copied into the result.
- Syntax
-
SECONDS_TO_DATE(value,"format")
where:
-
value is the number of seconds to convert.
-
format is a value of one or more field descriptors that
indicate the format to use.
Click here for a list of field descriptors.
- Examples
-
- SECONDS_TO_DATE(1133312345,"%a %b %d %H:%M:%S %Z %Y") returns
"Wed Nov 30 00:59:05 GMT 2005"
- SECONDS_TO_DATE(1133312345,"%y/%d/%m %H:%M:%S") returns
"05/30/11 00:59:05"
Note:
The examples assume that the YEARDAYMONTH function was run
first. In both examples, 1133312345 is the result of the
YEARDAYMONTH function on the number of seconds to convert
value.
|
TO_SECONDS |
Returns the specified date and time as seconds. Field descriptors start with
a percentage sign (%) followed by a field descriptor character.
- Syntax
-
TO_SECONDS("value","format")
where:
-
value is date and time.
-
format is a value of one or more field descriptors that
indicate the format to use.
Click here for a list of field descriptors.
- Examples
-
- TO_SECONDS("05/30/11 00:59:05", "%D %T") returns
1133312345.
- TO_SECONDS("14 December 14 01:01:01", "%d %B %y %T") returns
1418518861.
|
YEARDAYMONTH |
Returns the specified date, given as year/day/month, in seconds.
- Syntax
-
YEARDAYMONTH("date")
where date is the date you want to convert to seconds.
Choose from the following valid date formats:
- YY/D/M
- YYYY/D/M
- YY-D-M
- YYYY-D-M
Leading zeros on single digit days and months are acceptable.
Note:
Specifying an unsupported date format returns a blank.
- Examples
-
- YEARDAYMONTH("5/1/1") returns 1104901200.
- YEARDAYMONTH ("2005-01-12") returns 1133413200.
|
YEARMONTHDAY |
Returns the specified date, given as year/month/day, in seconds.
- Syntax
-
YEARMONTHDAY("date")
where date is the date you want to convert to seconds.
Choose from the following valid date formats:
- YY/M/D
- YYYY/M/D
- YY-M-D
- YYYY-M-D
Any group of three numbers is allowed. (You can add any numeric
value, the function will take the first three numbers). Leading
zeros on single digit days and months are acceptable.
Note:
Specifying an unsupported date format returns a blank.
- Examples
-
- YEARMONTHDAY("2005-12-01") returns 1133413200.
- YEARMONTHDAY("5/12/1") returns 1133413200.
|