----- Original Message ----- From: "Albert Berry" <[EMAIL PROTECTED]> To: "RBASE-L Mailing List" <[email protected]> Sent: Friday, January 11, 2008 9:33 PM Subject: [RBASE-L] - Re: DATETIME String Conversion ...
> R:Base after R:azzak is surprisingly smart. > > SET VAR vDateTime DATETIME > SET VAR vDateText TEXT > SET VAR vDateText = '03-Oct-2007 01:23:38 PM' > SET VAR vDateText = (SRPL(.vDateText,"Oct","10",0)) > set var vDateTime = .vDateText > SHOW VAR vDate% > vDateTime = 03/10/2007 13:23:38 DATETIME but isn't this Mar 3, 2007 ? > vDateText = 03-10-2007 01:23:38 PM TEXT > All you need to do is import the date from the other db as text, then do 12 > SRPLs and the problem disappears. I was interested to notice that the PM was > recognized by R:Base. > > Albert > > Wills, Joseph S wrote: >> This one is challenging me. I want to take this formatted DATETIME >> value, '03-Oct-2007 01:23:38 PM', a string from EXCEL, and convert it to >> some RBase DATETIME value or separate DATE and TIME values. I know that >> I can do RDATE||RTIME(INT_1,INT_2,INT_3), but that 3-CHAR abbreviation >> for MONTH has me stymied. >> >> The source is a Production DB in Oracle, to which I don't yet have any >> access, so it's probably gonna' be difficult in the short run for me to >> fix this by swimming upstream. >> >> Any thoughts? >> >> Thanks, >> Steve in Memphis >> >> >> J. Stephen Wills >> Program Manager, Research Informatics >> Office of the Vice Chancellor for Research >> University of Tennessee Health Science Center >> 62 S. Dunlap, Suite 400 >> Memphis, TN 38163 >> Office: 901-448-2389 >> FAX : 901-448-7133 >> >> >> >> > > >

