P. 1
SQR-guide

SQR-guide

4.5

|Views: 6,564|Likes:
Published by api-3801512

More info:

Published by: api-3801512 on Oct 17, 2008
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

09/23/2014

pdf

text

original

SQR allows you to specify date constants and date values in a special
format that is recognized without the use of an edit mask. This is called
the literal date format. For example, you can use a value in this format in
the strtodate function without the use of an edit mask. This format has the
advantage of being independent of any specific database or language
preference.

The literal date format is SYYYYMMDD[HH24[MI[SS[NNNNNN]]]]. The
first S in this format represents an optional minus sign. If preceded with a
minus sign, the string represents a date B.C. The following digits represent
year, month, day, hours, minutes, seconds, and microseconds.

À

NoteThe literal date format assumes a 24-hour clock.

You may omit one or more time elements from the right part of the
format. A default is assumed for the missing elements. Here are some
examples:

let $a = strtodate(’19960409’)
let $a = strtodate(’19960409152000’)

The first LET statement assigns the date of April 9, 1996 to the variable $a.
The time portion defaults to 00:00. The second LET statement assigns 3:20
in the afternoon of April 9, 1996 to $a. The respective outputs (when
printed with the edit mask ’DD-MON-YYYY HH:MI AM’) will be:

09-APR-1996 12:00 AM
09-APR-1996 03:20 PM

You can also specify a date format with the environment variable
SQR_DB_DATE_FORMAT. This format can be specified as an
environment variable or specified in the SQR.INI file. For more
information on the SQR.INI file, see the chapter "SQR.INI" in the SQR
Language Reference
.

SQR 4.3

Working with Dates

SQR User’s Guide

145

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->