My problem arose after many years of using my program.  First was a datetime 
issue(all tables have a datetime stamp).  So I went in and made sure I had time 
format to HH:MM ap, which solved the problem(so I thought), because later I 
started having a problem in the table for employee hours.  To make a long story 
short, over many of years of just using older programming I had realized that I 
had some forms which still set time format and or seq to HH:MM:SS/HHMMSS.  
These were done before I knew of setting a variable with 
'format(.#time,'hhmmss'), but was using set time seq hhmmss then using set var 
(ctxt(.#time)) and so on and so on.  I am now going thru all eeps, forms, etc 
and taking all ref to format and seq out(which I now know is/was my problem).  
I am living proof with what Razz always says about mucking with things like 
this.  
To the list, which is the preferred or best way to use time  HH:MM ap or 
HH:MM:SS, and yes I do now know the format and seq need to be set the same, but 
which is better.
Tom Hart




________________________________
 From: Karen Tellef <[email protected]>
To: RBASE-L Mailing List <[email protected]> 
Sent: Sunday, March 2, 2014 1:25 PM
Subject: [RBASE-L] - Re: Datetime issue
 


Tom:  Be very careful how you mix up the time sequence and the format.  
Originally we had our sequence as HHMMSS, with a format of HH:MM:SS.  We had a 
piece of program that would extract the max(datetimecol) from a table, and then 
bring up an edit form "where datetimecol = <value>".   Later on, the time 
format was changed to "HH:MM AP", while the sequence remained as HHMMSS.  The 
program that did the "where" clause then stopped working.  I reported it to 
RBTI thinking it was a bug, but their response was that there was a mismatch 
between the 2 settings so it wouldn't work.  We changed the format back to 
HH:MM:SS because the sequence was the more important thing for us. 


Karen



-----Original Message-----
From: TOM HART <[email protected]>
To: RBASE-L Mailing List <[email protected]>
Sent: Sun, Mar 2, 2014 7:46 am
Subject: [RBASE-L] - Re: Datetime issue


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