Difference between revisions of "Working With Date and Time Data in Recital"
From Recital Documentation Wiki
Barrymavin (Talk | contribs) (→Working With Date and Time Data in Recital) |
Yvonnemilne (Talk | contribs) (→Date and Time Conversion Functions) |
||
Line 9: | Line 9: | ||
* [[CTOD()|ctod()]] - perform character to date conversion | * [[CTOD()|ctod()]] - perform character to date conversion | ||
+ | |||
+ | <pre> | ||
+ | date = ctod(string as character) | ||
+ | </pre> | ||
+ | |||
* [[CTOT()|ctot()]] - perform character to datetime conversion | * [[CTOT()|ctot()]] - perform character to datetime conversion | ||
− | * [[DATE()|date()]] - perform numeric year,month,day to date conversion | + | |
− | * [[DATETIME()|datetime()]] - perform numeric year,month,day to datetime conversion | + | <pre> |
+ | datetime = ctot(string as character) | ||
+ | </pre> | ||
+ | |||
+ | * [[DATE()|date()]] - perform numeric year, month , day to date conversion | ||
+ | |||
+ | <pre> | ||
+ | date = date(year as numeric, month as numeric, day as numeric) | ||
+ | </pre> | ||
+ | |||
+ | * [[DATETIME()|datetime()]] - perform numeric year, month, day to datetime conversion | ||
+ | |||
+ | <pre> | ||
+ | datetime = datetime(year as numeric, month as numeric, day as numeric) | ||
+ | </pre> | ||
+ | |||
* [[DAYS()|days()]] - perform numeric seconds to numeric whole days conversion | * [[DAYS()|days()]] - perform numeric seconds to numeric whole days conversion | ||
+ | |||
+ | <pre> | ||
+ | numeric = days(seconds as numeric) | ||
+ | </pre> | ||
+ | |||
* [[DMY()|dmy()]] - perform date to character (DMY) conversion | * [[DMY()|dmy()]] - perform date to character (DMY) conversion | ||
+ | |||
+ | <pre> | ||
+ | string = dmy(date as date) | ||
+ | </pre> | ||
+ | |||
* [[DTOC()|dtoc()]] - perform date to character conversion | * [[DTOC()|dtoc()]] - perform date to character conversion | ||
+ | |||
+ | <pre> | ||
+ | string = dtoc(date as date) | ||
+ | </pre> | ||
+ | |||
* [[DTOM()|dtom()]] - perform date to string (DD-Mmm-YYYY) conversion | * [[DTOM()|dtom()]] - perform date to string (DD-Mmm-YYYY) conversion | ||
+ | |||
+ | <pre> | ||
+ | string = dtom(date as date) | ||
+ | </pre> | ||
+ | |||
* [[DTOS()|dtos()]] - perform date to string conversion | * [[DTOS()|dtos()]] - perform date to string conversion | ||
+ | |||
+ | <pre> | ||
+ | string = dtos(date as date) | ||
+ | </pre> | ||
+ | |||
* [[MDY()|mdy()]] - perform date to character (MDY) conversion | * [[MDY()|mdy()]] - perform date to character (MDY) conversion | ||
+ | |||
+ | <pre> | ||
+ | string = mdy(date as date) | ||
+ | </pre> | ||
+ | |||
* [[MTOD()|mtod()]] - perform string (DD-Mmm-YYYY) to date conversion | * [[MTOD()|mtod()]] - perform string (DD-Mmm-YYYY) to date conversion | ||
+ | |||
+ | <pre> | ||
+ | date = mtod(string as character) | ||
+ | </pre> | ||
+ | |||
* [[STOD()|stod()]] - perform string to date conversion | * [[STOD()|stod()]] - perform string to date conversion | ||
+ | |||
+ | <pre> | ||
+ | date = stod(string as character) | ||
+ | </pre> | ||
+ | |||
* [[TSTRING()|tstring()]] - perform numeric seconds to time string conversion | * [[TSTRING()|tstring()]] - perform numeric seconds to time string conversion | ||
+ | |||
+ | <pre> | ||
+ | string = tstring(seconds as numeric) | ||
+ | </pre> | ||
+ | |||
* [[TTOC()|ttoc()]] - perform datetime to string conversion | * [[TTOC()|ttoc()]] - perform datetime to string conversion | ||
+ | |||
+ | <pre> | ||
+ | string = ttoc(datetime as datetime) | ||
+ | </pre> | ||
+ | |||
* [[TTOD()|ttod()]] - perform datetime to date conversion | * [[TTOD()|ttod()]] - perform datetime to date conversion | ||
+ | |||
+ | <pre> | ||
+ | date = ttod(datetime as datetime) | ||
+ | </pre> | ||
===Miscellaneous Date and Time Functions=== | ===Miscellaneous Date and Time Functions=== |
Revision as of 17:00, 14 January 2010
Working With Date and Time Data in Recital
Date and Time Conversion Functions
See Also
Certain set commands change the date format: set century, set date, set epoch and set mark.
Table of Contents
- ctod() - perform character to date conversion
date = ctod(string as character)
- ctot() - perform character to datetime conversion
datetime = ctot(string as character)
- date() - perform numeric year, month , day to date conversion
date = date(year as numeric, month as numeric, day as numeric)
- datetime() - perform numeric year, month, day to datetime conversion
datetime = datetime(year as numeric, month as numeric, day as numeric)
- days() - perform numeric seconds to numeric whole days conversion
numeric = days(seconds as numeric)
- dmy() - perform date to character (DMY) conversion
string = dmy(date as date)
- dtoc() - perform date to character conversion
string = dtoc(date as date)
- dtom() - perform date to string (DD-Mmm-YYYY) conversion
string = dtom(date as date)
- dtos() - perform date to string conversion
string = dtos(date as date)
- mdy() - perform date to character (MDY) conversion
string = mdy(date as date)
- mtod() - perform string (DD-Mmm-YYYY) to date conversion
date = mtod(string as character)
- stod() - perform string to date conversion
date = stod(string as character)
- tstring() - perform numeric seconds to time string conversion
string = tstring(seconds as numeric)
- ttoc() - perform datetime to string conversion
string = ttoc(datetime as datetime)
- ttod() - perform datetime to date conversion
date = ttod(datetime as datetime)
Miscellaneous Date and Time Functions
See Also
Certain set commands change the date format: set century, set date, set epoch and set mark.
Table of Contents
- ampm() - return 12-hour clock time as a character string followed by "am" or "pm"
- cdow() - return the character day of week from a date or datetime
- cmonth() - return the character month from a date or datetime
- date() - return the system date as a date
- datetime() - return the system date and time as a datetime
- day() - return the numeric day of the month from a date or datetime
- dow() - return the numeric day of the week from a date or datetime
- elaptime() - return time difference between two time strings as a time string
- epoch() - return the current set epoch setting
- gomonth() - return a date a specified number of months before or after a date or datetime
- hour() - return the numeric hours from a datetime
- hours() - return the numeric hours from a time string
- minute() - return the numeric minutes from a datetime
- minutes() - return the numeric minutes from a time string
- month() - return the numeric month from a date or datetime
- quarter() - return the numeric year quarter from a date or datetime
- sec() - return the numeric seconds from a datetime
- seconds() - return the numeric seconds from the current time or a time string
- secs() - return the numeric seconds from a time string
- time() - return the system time as a time string
- timestamp() - return the system date and time
- validtime() - check the validity of a time string
- week() - return the numeric week from a date or datetime
- year() - return the numeric year from a specified date or datetime