Format is used when casting FROM a character TO a Timestamp and FROM a Timestamp TO a Character.
If you have a character that is a timestamp of some sort and you want to convert it to a different formatted character that is also a timestamp, you need to
Cast the character to a timestamp using the right format that represents the input character string
cast the timestamp using the right format to represent the output character string
Casting a timestamp to a timestamp doesn't use a format. Timestamps don't have any format at all. _________________ chmod -R ugo-wx /
Posted: Thu Nov 17, 2016 8:48 am Post subject: Re: Converting character to timestamp
Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
chaitu wrote:
Can anyone help me to figure it out.
So what you're asking us to help you figure out is why a FORMAT parameter intended to convert a string in the format yymmdd into a timestamp abends if you feed it mmddyyy or a null?
Most software functions abend if they're given data they don't expect.... _________________ Honesty is the best policy.
Insanity is the best defence.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum