Difference between revisions of "STOD()"

From Lianjapedia
Jump to: navigation, search
 
(See Also)
 
(6 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
==Purpose==
 
==Purpose==
 
Function to perform string to date conversion
 
Function to perform string to date conversion
 
  
 
==Syntax==
 
==Syntax==
 
STOD(<expC>)
 
STOD(<expC>)
 
  
 
==See Also==
 
==See Also==
[[CTOD()]], [[DTOS()]], [[SET CENTURY]]
+
[[AMPM()]], [[CDOW()]], [[CMONTH()]], [[CTOD()]], [[CTOT()]], [[DATE()]], [[DATETIME()]], [[DAY()]], [[DAYS()]], [[DMY()]], [[DOW()]], [[DTOA()]], [[DTOC()]], [[DTOM()]], [[DTOS()]], [[DTOT()]], [[DTOV()]], [[ELAPTIME()]], [[EMPTY()]], [[EPOCH()]], [[GOMONTH()]], [[HOUR()]], [[HOURS()]], [[ISLEAPYEAR()]], [[LEAPYEARS()]], [[LTOS()]], [[MDY()]], [[MINUTE()]], [[MINUTES()]], [[MONTH()]], [[MTOD()]], [[MTOS()]], [[QUARTER()]], [[SEC()]], [[SECONDS()]], [[SECS()]], [[SET CENTURY]], [[SET DATE]], [[SET EPOCH]], [[SET HOURS]], [[SET MARK]], [[SET SECONDS]], [[STOT()]], [[STR()]], [[STRFTIME()]], [[TIME()]], [[TIMEOFDAY()]], [[TIMESTAMP()]], [[TSTRING()]], [[TTOC()]], [[TTOD()]], [[TYPE()]], [[VAL()]], [[VALIDTIME()]], [[VTOD()]], [[WEEK()]], [[YEAR()]]
 
+
  
 
==Description==
 
==Description==
 
The STOD() function converts the character expression <expC>, in the format "YYYYMMDD", to a date.  This function needs the century included in the character string even if SET CENTURY is OFF.
 
The STOD() function converts the character expression <expC>, in the format "YYYYMMDD", to a date.  This function needs the century included in the character string even if SET CENTURY is OFF.
 
  
 
==Example==
 
==Example==
 
<code lang="recital">
 
<code lang="recital">
? dtos(date())
+
mCdate = dtos(date())
20001015
+
? mCdate
store dtos(date()) to mDate
+
20130722
? mDate
+
? type("mCdate")
20001015
+
C
? type("mDate")
+
mDdate = stod(mCdate)
 +
? mDdate
 +
07/22/2013
 +
? type("mDdate")
 
D
 
D
 
</code>
 
</code>
  
 
==Products==
 
Recital, Recital Server
 
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Functions]]
 
[[Category:Functions]]
[[Category:Expressions and Type Conversion]]
+
[[Category:Formatting Functions]]
[[Category:Expressions and Type Conversion Functions]]
+
[[Category:Date and Time Data]]
+
 
[[Category:Date and Time Data Functions]]
 
[[Category:Date and Time Data Functions]]

Latest revision as of 08:44, 8 October 2019

Purpose

Function to perform string to date conversion

Syntax

STOD(<expC>)

See Also

AMPM(), CDOW(), CMONTH(), CTOD(), CTOT(), DATE(), DATETIME(), DAY(), DAYS(), DMY(), DOW(), DTOA(), DTOC(), DTOM(), DTOS(), DTOT(), DTOV(), ELAPTIME(), EMPTY(), EPOCH(), GOMONTH(), HOUR(), HOURS(), ISLEAPYEAR(), LEAPYEARS(), LTOS(), MDY(), MINUTE(), MINUTES(), MONTH(), MTOD(), MTOS(), QUARTER(), SEC(), SECONDS(), SECS(), SET CENTURY, SET DATE, SET EPOCH, SET HOURS, SET MARK, SET SECONDS, STOT(), STR(), STRFTIME(), TIME(), TIMEOFDAY(), TIMESTAMP(), TSTRING(), TTOC(), TTOD(), TYPE(), VAL(), VALIDTIME(), VTOD(), WEEK(), YEAR()

Description

The STOD() function converts the character expression <expC>, in the format "YYYYMMDD", to a date. This function needs the century included in the character string even if SET CENTURY is OFF.

Example

mCdate = dtos(date())
? mCdate
20130722
? type("mCdate")
C
mDdate = stod(mCdate)
? mDdate
07/22/2013
? type("mDdate")
D