Solved

convert a unix time stamp to oracle date formate

Posted on 2006-06-28
3
2,775 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
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…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

776 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