Oracle: epoch date to date with CEST and CET

I got a date like this '1302104376' stored with the italian timezone UTC+1. I need to convert it into the format DD:MM:YYYY HH:SS, but with timezione UTC + 0 (GMT). Does exists a function that does the work, paying attention to the daylight period ?

Thanks for your help Simone

Answers


This should get you close:

SQL> SELECT TO_CHAR(TO_DATE('19700101','YYYYMMDD') + 
                    (1302104376/(60*60*24)),'DD:MM:YYYY HH24:MI:SS') the_date 
       FROM dual;

THE_DATE
-------------------
06:04:2011 15:39:36

SQL> 

You'll need to adjust your output accordingly for differences in timezones, DST, etc.

This site is highly instructive regarding epoch dates.


Need Your Help

What is the file path, as a string, of a file in the application's resources?

vb.net printing resources

The reason I ask is that I want to print, at run-time, a file in the application's resources, like this:

Android Paint.setTypeface isn't working for italic

android paint typeface italic

The Paint.setTypeface is not working for italic or I'm doing something the wrong way. I can create normal, bold, monospace, and serif text, but I can't create italic text. It always looks normal (...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.