Solved

convert a unix time stamp to oracle date formate

Posted on 2006-06-28
3
2,785 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

Question has a verified solution.

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

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

717 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