Page 1 of 1

How to convert JULIAN DATE to DATE using schema file

Posted: Thu May 03, 2012 6:58 am
by pdv
Hi, Could you please anyone help me on the below requirement.

I need to convert Julian date to date using schema file, I tried the below format, but which is not working.

date:nullable date {date_format='%cc%yy%ddd', null_field='0000000'};

date:nullable date {date_format='%yyy%ddd', null_field='0000000'};

Please anyone help me to know what is the correct format for ccyyddd (julian date) in schema file.


Thanks in advance.

Posted: Thu May 03, 2012 7:15 am
by chulett
Let's start by getting your post in the correct forum.

(moved)

Posted: Thu May 03, 2012 9:01 am
by jwiles
What's the format of your incoming date? The format string should specify that format...i.e. the format you're wanting to convert from.
If this were an output stage, it would be the format you're wanting to convert to.

Regards,

Posted: Thu May 03, 2012 4:09 pm
by ray.wurlod
So you're using an ordinal date (year and day number within year) rather than a Julian date (days offset from a known zero date)?
Try "%yyyy%ddd" as the format string.

Posted: Thu May 03, 2012 11:56 pm
by jwiles
Explain what you mean by "it's not working". What results DO you get and what is your output target? Are you loading directly to an Oracle table, or are you writing to a file before loading to Oracle?

Regards,

Posted: Fri May 04, 2012 12:56 am
by ray.wurlod
Are you sure you've tried "%yyyy%ddd"? Your initial post specified "%yyy%ddd".