BOB: Business Objects Board
Not endorsed by or affiliated with SAP

Register | Login 

Want to sponsor BOB? 
Want to sponsor BOB? (Opens a new window)  

General Notice: BOB is going to retire...please see details here.
General Notice: No events within the next 45 days.

DateTime Conversion


 
Search this topic... | Search DI: Designer and Job Design... | Search Box
Register or Login to Post    Forum Index -> Data Integrator -> DI: Designer and Job Design  Previous TopicPrint TopicNext Topic
Author Message
fblau
Principal Member
Principal Member



Joined: 07 Feb 2005

Posts: 220



PostPosted: Fri Mar 11, 2005 2:22 pm 
Post subject: DateTime Conversion

I get a date value from a DOS batch file DIR command that looks like this:

"02/22/2005 03:49 PM"

When DI imports this to a datetime column, it makes it

02/22/2005 03:49 AM

Any ideas?
Back to top
Nicolas Hadj-Blaha
Principal Member
Principal Member



Joined: 10 Mar 2005
ASUG Icon
Posts: 481
Location: New Zealand


flag
PostPosted: Mon Mar 14, 2005 6:17 am 
Post subject: Re: DateTime Conversion

May be you could try to use the to_date() function to convert the output of the DOS command before assigning it to a global variable.

A possible workaround would be to remove the PM/AM from the output string and reassign it automatically with the to_date() function.

Hope this helps.

Nicolas
www.dataintegrator.net

_________________
Lead Data Architect, Synchrony Global
Back to top
BODIpop
Senior Member
Senior Member



Joined: 14 Feb 2005

Posts: 38



PostPosted: Mon Mar 14, 2005 10:00 am 
Post subject: Re: DateTime Conversion

you could take the string in as a varchar. Within a query use a substring to get the time part out do and if then else on the PM/AM characters to decide whether to add 12hrs or not this should give you a 24hr clock.Glue it all back together as a string.and then to_date it.
Back to top
dnewton
Forum Addict
Forum Addict



Joined: 30 Jan 2004
ASUG Icon
Posts: 3458
Location: Massachusetts, USA


flag
PostPosted: Mon Mar 14, 2005 10:31 am 
Post subject: Re: DateTime Conversion

It may be the space in between the "3:49" and "PM" that is causing the problem. That is, if it were "3:49PM" (no space) maybe it would convert more cleanly?
Back to top
Display posts from previous:   
Register or Login to Post    Forum Index -> Data Integrator -> DI: Designer and Job Design  Previous TopicPrint TopicNext Topic
Page 1 of 1 All times are GMT - 5 Hours
 
Jump to:  

Index | About | FAQ | RAG | Privacy | Search |  Register |  Login 

Get community updates via Twitter:

Not endorsed by or affiliated with SAP
Powered by phpBB © phpBB Group
Generated in 0.0268 seconds using 17 queries. (SQL 0.0025 Parse 0.0008 Other 0.0234)
CCBot/2.0 (https://commoncrawl.org/faq/)
Hosted by ForumTopics.com | Terms of Service
phpBB Customizations by the phpBBDoctor.com
Shameless plug for MomentsOfLight.com Moments of Light Logo