Page 1 of 1
Date conversions
Posted: Tue Jan 18, 2005 9:38 am
by Jay
Hi All,
How do i convert a date in Oracle 9i Timestamp format to an Oracle 9i date in YYYYDDD format ?
Without iconv/oconv i am running out of ideas....i tried the TimestampToDate...but i have not been successful so far...
Thanks in advance
Jay
Posted: Tue Jan 18, 2005 3:29 pm
by ray.wurlod
How about converting it with a TO_CHAR function in the original SQL that extracts it from the table?
Posted: Tue Jan 18, 2005 5:17 pm
by Jay
That is what i did....
i have the input string in YYYYDDD format and
target is a date in YYYYDDD format....
how do i do the reverse...something like a to_date()....will it work if i do a to_date() in the insert/ update statements....
problem is i cannot test it...i am getting that darn "Oracle does not exist" error...
i was thinking maybe because of the mismatch in metadata, i might be getting the error or it actually is a config/path error.....
Posted: Tue Jan 18, 2005 5:18 pm
by Jay
Anyways, thanks for your time, Ray...
Posted: Wed Jan 19, 2005 7:20 pm
by T42
Why not StringToDate(TimeStampToString())? You will need a Left() or something within there somewhere to truncate the output from TimeStampToString().