Convert Minutes to Date in oracle
If user has number between 00 to 59,That number can be converted to timestamp .
Syntax:
to_timestamp(minutes,fmt)
to_timestamp('00','mi')
-------------------------------------------------
01-MAY-14 00.00.00.000000000 PM
It has current date, time specified in the format.
to_timestamp('59','mi')
-----------------------------------------------
01-MAY-13 00.59.00.000000000 AM
If minutes is not between 00 and 59
following error message will be displayed.
ORA-01851: minutes must be between 0 and 59
Tags: Convert minutes to date/timestamp,convert minutes to Date/timestamp using To_timestamp function,oracle convert minutes to date ,oracle convert minutes to date/timestamp using to_date,oracle convert minutes to current minutes date/timestamp.
No comments:
Post a Comment