Difference between revisions of "STOD()"

From Recital Documentation Wiki
Jump to: navigation, search
 
Line 17: Line 17:
 
==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>

Latest revision as of 09:29, 22 July 2013

Purpose

Function to perform string to date conversion


Syntax

STOD(<expC>)


See Also

CTOD(), DTOS(), SET CENTURY


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


Products

Recital, Recital Server