Solved

convert a unix time stamp to oracle date formate

Posted on 2006-06-28
3
2,776 Views
Last Modified: 2012-06-27
can we convert a unix time stamp 1151530818 into oracle date formate  jan-22-1987  so that i can use it in my report



0
Comment
Question by:sweetysmile
3 Comments
 
LVL 28

Accepted Solution

by:
bdreed35 earned 250 total points
ID: 17005718
Since the Unix timestamp field is the number of seconds since 1/1/1970, you can create a formula to convert it using the dateadd function:

local numbervar secs := 1151530818; //replace 1151530818 with the unix timestamp field
dateadd("s",secs,date(1970,1,1))

This will return a date field that you can format once you drag the formula onto the report.
If you want it to return a string in the above format you can make your formula this:

local numbervar secs := 1151530818; //replace 1151530818 with the unix timestamp field
totext(dateadd("s",secs,date(1970,1,1)),"MMM-dd-yyyy")
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question