solidDB Help : solidDB reference : solidDB SA: Function reference : SaDateSetAsciiz
  
SaDateSetAsciiz
SaDateSetAsciiz sets ASCII zero string date to a date object.
The following table details the special characters that are recognized in the format string:
 
YYYY
year including century
YY
year with default century 1900
MM
month
M
month
DD
day of month
D
day of month
HH
hours
H
hours
NN
minutes
N
minutes
SS
seconds
S
seconds
FFF
fractions of a second, 1/1000 seconds
All fields are optional. The fields are scanned from the format string, and when a match is found, the field is replaced with the proper value. All other characters in the format are treated literally.
Double letters (for example, "MM", "DD", and so on) indicate that the values should be expressed with two digits (values 1-9 will be preceded with the 0 character, for example, 01). Single letters indicate that the value should be expressed with one digit if possible. For example, if you define the date format as "YY-M-D" then the date January 2, 1999 will look like "99-1-2". If you define the date format as "YY-MM-DD", then the date will look like "99-01-02"
The following examples show the usage of date formats:
SaDateSetAsciiz(date, "YY-MM-DD", "94-09-13");
SaDateSetAsciiz(date, "MM/DD/YY HH.NN", "09/13/94 19.20");
The default date format is YYYY-MM-DD HH:NN:SS, where time fields are optional.
Synopsis
SaRetT SA_EXPORT_H SaDateSetAsciiz(
  SaDateT* date,
  char* format,
  char* asciiz)
Parameters
The following table describes the parameters:
 
Parameters
Usage type
Description
date
in, out
Date object
format
in, use
Format of date in asciiz (zero-terminated ASCII) buffer, or NULL if default format is used
asciiz
in, use
Buffer containing the data in asciiz (zero-terminated ASCII) string format
Return value
SA_RC_SUCC SA_ERR_FAILED
Go up to
solidDB SA: Function reference