on 11-13-2013 5:02 PM
Hi all ,
My client gave me the time in sec for ex : 576210000.
I need to convert this sec into DD-MM-YYYY HH:MM:sec.
Any suggestions or solutions would of great for me.
Thanks and Regards,
Kishan.
Hi Kishan,
I think the simple way is to use the add_seconds function. Something like:
select add_seconds(to_timestamp('1900-01-01 00:00:00'), 576210000) "new_date" from dummy;
new_date
6 Apr, 1918 2:20:00.0 AM
Regards,
Ravi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Kishan:
Try this:
select variant_date - (576210000/60/60/24) from dual - where variant date can be the date you want to use to compare the difference. This will be the starting point to your requirement.
Let me know the full requirement on what you are trying to do so that I can provide additional tips.
Hope this helps.
Regards,
Rama
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Before you can do it you need to understand when the date starts in your database... like 1//1/2000 00:00:00.. like what is the calendar date when your system date was 0
Without that it will not be possible to convert to any date
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try the approach as Rama suggested ..
Check if this formula works for you..
select to_Date('1990-01-01 00:00:00','YYYY-MM-DD HH:MM:SS') - (Date_in_seconds/60/60/24) from dual
If this approach does not work please update ; you can also google "converting Epoch to human readable date" for additional ideas on conversion..
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.