cancel
Showing results for 
Search instead for 
Did you mean: 

Datetime issue when loading data

Former Member
0 Kudos

Hi,

Am loading a table from oracle to sql server in BODS, which has a datetime column in source.

when i use SSIS ( ETL tool ) , the corresponding datetime  column is getting loaded as 

2012-12-16 08:00:00  , which is correct.

But when i use BODS, it is getting loaded as

2012-12-16 08:00:00.000000

In destination this column is varchar(30).

how can i restrict this in BODS ?

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

BOTH CAST() AND TO_CHAR() WILL HELP YOU DO THE REQUIREMENT...

Former Member
0 Kudos

Hello

You are implicitly converting from datetime to a string, in fact Data Services is probably giving you a warning.  To explicity control the conversion to a string representation, use the to_char function.

Michael

akhileshkiran
Contributor
0 Kudos

Hi ,

As said you can you cast function to convert data types.

Output:

Regards,

Akhileshkiran.

former_member186897
Contributor
0 Kudos

You can format it like:

Cast(Date_Field,’datetime’)

It should return you the date in below format: YYYY.MM.DD HH24:MI:SS

Former Member
0 Kudos

i tried this, but still am getting the date as 2010-11-24 22:40:30.0000000 format only..

am using sql 2012

former_member186897
Contributor
0 Kudos

Hi samuel v,

Can you please share the screen shot as how you have mapped this field? Let us know if this is not yet resolved.

Regards,

MSA