My question is, will either way work as long as they are set to the same   
HH:MM ap/HHMM or HH:MM:SS/HHMMSS?
Tom Hart




________________________________
 From: A. Razzak Memon <[email protected]>
To: RBASE-L Mailing List <[email protected]> 
Sent: Saturday, March 1, 2014 7:29 PM
Subject: [RBASE-L] - Re: Datetime issue
 

At 12:04 PM 3/1/2014, TOM HART wrote:

> .. first thing I checked was the time format and it was HH:MM ap, looking
> further I find the time seq is hhmmss. If I change both to the same either
> HH:MM:SS and hhmmss, or HH:MM ap and hhmm they will both work. My question
> is which is the proper way?

Tom,

FWIW ...

The keyword SEQ (sequence) sets the "data entry" sequence such as HHMMSS
while the keyword FOR (format) sets the "display format". This is as
simple as it can get.

The best practice, to be consistent, is to enforce all database settings,
including CHARACTERs, CURRENCY, DATE, and TIME in application start-up
file as follows:

-- Example
-- RBASE.DAT or Application Stat-up File
   SET QUOTES=NULL
   SET QUOTES='
IF (SGET(CVAL('VERSION'),2,21)) = '64' THEN
   SET NAMEWIDTH 32
ENDIF
   SET QUOTES=NULL
   SET QUOTES='
   SET DELIMIT=NULL
   SET DELIMIT=','
   SET LINEEND=NULL
   SET LINEEND='^'
   SET SEMI=NULL
   SET SEMI=';'
   SET PLUS=NULL
   SET PLUS='+'
   SET SINGLE=NULL
   SET SINGLE='_'
   SET MANY=NULL
   SET MANY='%'
   SET IDQUOTES=NULL
   SET IDQUOTES='`'
   SET CURRENCY '$' PREF 2 B
   SET DATE FORMAT MM/DD/YYYY
   SET DATE SEQUENCE MMDDYY
   SET DATE YEAR 30
   SET DATE CENTURY 19
   SET TIME FORMAT HH:MM AP
   SET TIME SEQUENCE HHMM
   CONNECT dbname IDENTIFIED BY user password
   -- Now Enforce Database Settings
   SET QUOTES=NULL
   SET QUOTES='
   SET DELIMIT=NULL
   SET DELIMIT=','
   SET LINEEND=NULL
   SET LINEEND='^'
   SET SEMI=NULL
   SET SEMI=';'
   SET PLUS=NULL
   SET PLUS='+'
   SET SINGLE=NULL
   SET SINGLE='_'
   SET MANY=NULL
   SET MANY='%'
   SET IDQUOTES=NULL
   SET IDQUOTES='`'
   SET CURRENCY '$' PREF 2 B
   SET DATE FORMAT MM/DD/YYYY
   SET DATE SEQUENCE MMDDYY
   SET DATE YEAR 30
   SET DATE CENTURY 19
   SET TIME FORMAT HH:MM AP
   SET TIME SEQUENCE HHMM
   SET NULL ' '
   SET AUTOSKIP OFF
   SET ZERO ON
   SET WALKMENU ON
   RETURN

You may adapt this technique for all your applications, if you wish.

Feel free to modify these settings as you see fit.

Using this routine, and enforcing your database specific settings,
you will ALWAYS get consistent results.

Very Best R:egards,

Razzak.

www.rbase.com
www.facebook.com/rbase
-- 31 years of continuous innovation!
16 Years of R:BASE Technologies, Inc. making R:BASE what it is today!
-- 

Reply via email to