Solved

convert a unix time stamp to oracle date formate

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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

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 …
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…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

743 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now