. further to prior post .

R>SHOW TIME

TIME format     HH:MM:SS

TIME sequence   HHMMSS

 

Brad

 

From: [email protected] [mailto:[email protected]] On Behalf Of Paul Buckley
Sent: Tuesday, October 16, 2012 9:07 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - RE: Datetime tutorial

 

Karen,

 

Although I use 9.5, I just tested this in 7.6 and it works fine. Be sure and
check you TIME FORMAT settings as Dennis suggested. Mine are set as he
indicates, YYYY

 

Paul

 

From: [email protected] [mailto:[email protected]] On Behalf Of Dennis
McGrath
Sent: Tuesday, October 16, 2012 11:51 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - RE: Datetime tutorial

 

Make sure your TIME FORMAT uses YYYY

 

SET VAR vDatetime = .#NOW

Should result in a DATETIME

 

I remember I had a lot of trouble with 7.6 until I changed the DATE FORMAT

 

 

Dennis McGrath

Software Developer

QMI Security Solutions

1661 Glenlake Ave

Itasca IL 60143

630-980-8461

[email protected]

From: [email protected] [mailto:[email protected]] On Behalf Of
[email protected]
Sent: Tuesday, October 16, 2012 10:09 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Datetime tutorial

 

Here's one for the slow list...  So far in my RBase career, I have
been blessedly spared from doing time arithmetic.  That's about
to change.

Although this client has purchased some version of 9.x, for the
immediate need this will be done in 7.6.

I'm still trying to get an answer on whether I need to track time only,
or whether I will need a DateTime.  I've been playing around with
DateTime and am totally confused.  I've read all the help screens
I could find but mine aren't working that way!

If I do:   SET VAR vDatetime = .#NOW
the datatype is Text and cannot be used for arithmetic

If I do:  SET VAR vDatetime DATETIME = .#NOW
I get an error message about my variable not having the same data type

If I do:  SET VAR vDatetime DATETIME = (DATETIME(.#date, .#time))
then I do get a datetime variable, and it appears I can use these for
arithmetic.  If I subtract 2 datetime variables I get an integer which I
suspect is in seconds, right?  So basically the .#now is not good for calcs?

Now part two.  I set up a temp table with a column with DATETIME 
data type, and am incapable of getting a value loaded.  Using my now
valid DateTime variables, I try to do an insert and I get the same error 
message above about invalid data types:
       insert into testklt (onedatetime) values .vDateTime

Hard to believe I've gotten away with not a single DateTime in my clients,
isn't it??   Well, now I might need to use it.   
       

Karen

Reply via email to