Hi All,
Could you please look into this
" How to convert julian Date format to Oracle Date format "
Thanks in Advance
srini
How to convert julian Date format to Oracle Date format
Moderators: chulett, rschirm, roy
That's a real Julian date. Typically people mean an Ordinal date when they say Julian - the year plus the day number of that year.
That being said - there's no such thing as "Oracle date format". Oracle dates are stored in an internal representation and you can load and extract them from Oracle in pretty much any format.
What's important when loading is to make sure the format of the date and the format mask you are using match. And the best way to do (IMHO) that is to stick with ISO formatting, which is what the stages will automatically generate and consume.
My 'rules' are to stick with the Timestamp datatype when dealing with Oracle DATE fields. The OCI stages automatically generate SQL to extract or load the fields in the following format:
I prefer to explicitly handle the 'time' portion of the date, even when that means adding a 'zero time' to those dates that don't "need" a time portion. This gives us full control over the DATE field and the stages never have a problem handling them. A 'standard' set of custom DATE handling routines helps everyone be consistant in their jobs.
That being said - there's no such thing as "Oracle date format". Oracle dates are stored in an internal representation and you can load and extract them from Oracle in pretty much any format.
What's important when loading is to make sure the format of the date and the format mask you are using match. And the best way to do (IMHO) that is to stick with ISO formatting, which is what the stages will automatically generate and consume.
My 'rules' are to stick with the Timestamp datatype when dealing with Oracle DATE fields. The OCI stages automatically generate SQL to extract or load the fields in the following format:
Code: Select all
YYYY-MM-DD HH24:MI:SS
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
Re: How to convert julian Date format to Oracle Date format
The specific answer depends on whether this is in fact a Julian date or an Ordinal date. That will drive the flavor of IConv you will use to convert the date to internal format.ysrini9 wrote:How to convert julian Date format to Oracle Date format
After that, my advise for the output format applies.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 232
- Joined: Fri Sep 30, 2005 4:52 am
- Contact: