Dennis:  I found out that I do need to use DateTime, so I gotta get this 
figured
out...   I changed my date format to MM/DD/YYYY  (it was 2-digit year)

But my SET VAR vDatetime = .#NOW  still results in a Text and I'm still
unable to get data into a table with a Datetime column

Karen


In a message dated 10/16/2012 10:53:54 AM Central Daylight Time, 
[email protected] writes: 
> 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