Hi,
I wish to insert records with large dates as in 5874897-12-31. The field can contain smaller dates as well say 101-12-31. The function date_from_string in datastage requires exact date format %yyyy-%%mm-%dd, but my data can vary from %yyy-%mm-%dd to %yyyyyyy-%mm-%dd.
Is there any way to convert such strings to date format? and also is there any upper limit on that? My database supports dates till year 5874897.
Another question is, is there any way to load dates with BC & AD values in them like - 4713-01-01 BC. My database supports it but I could not figure out how to make DataStage understand that this is a valid date. If I map varchar to date type I have to convert it manually using some function, date_from_string also does not seems to understand dates with BC, AD.
Please suggest.
Support for large dates - say 5874897-12-31
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 39
- Joined: Thu Nov 23, 2006 11:23 pm
Re: Support for large dates - say 5874897-12-31
Ok, let me be the first to ask - what database supports 'large dates' like that and why in the world would you want to use them?
![Confused :?](./images/smilies/icon_confused.gif)
Suggest you leave that bit off.manish1005 wrote:date_from_string also does not seems to understand dates with BC, AD.
Please suggest.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 39
- Joined: Thu Nov 23, 2006 11:23 pm
>what database supports 'large dates' like that.
Well postgres database supports that, and i guess other datases would also support atleast dates with 5 digit years %yyyyy-%mm-%dd
>why in the world would you want to use them
why not, say I have a database of objects related to archeology(or may be even astronomy) which gives me dates from carbon dating of dinosaur bones. (instead of writing years, I wish to store it in date format with month/date as 01-01 and of course in BC era).
Moreover, instead of questioning *why* I have to provide a solution for *how* part![Sad :(](./images/smilies/icon_sad.gif)
Well postgres database supports that, and i guess other datases would also support atleast dates with 5 digit years %yyyyy-%mm-%dd
>why in the world would you want to use them
why not, say I have a database of objects related to archeology(or may be even astronomy) which gives me dates from carbon dating of dinosaur bones. (instead of writing years, I wish to store it in date format with month/date as 01-01 and of course in BC era).
Moreover, instead of questioning *why* I have to provide a solution for *how* part
![Sad :(](./images/smilies/icon_sad.gif)
Just curiousity on my part is all.
No clue on the how. If no-one else pops in here having done that before, why not open a case with your official Support provider? Go back to the source and ask them if they can support dates of that nature.
No clue on the how. If no-one else pops in here having done that before, why not open a case with your official Support provider? Go back to the source and ask them if they can support dates of that nature.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 39
- Joined: Thu Nov 23, 2006 11:23 pm