Solved

Unix Timestamp conversion to dateTime in Crystal reports problem

Posted on 2004-04-20
4
1,982 Views
Last Modified: 2009-05-02
I am using mysql database and I am storing dates/times as unix timestamps (number of seconds since unix epoch, 1974?).  Anyways I am trying to convert these dates back into month, day, year hh:mm:ss format in crystal reports.  All the crystal report formula subroutines expect another data type than a unix timestamp, how would I go about getting them into the correct format?
0
Comment
Question by:matthew_newell
[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
4 Comments
 
LVL 42

Accepted Solution

by:
frodoman earned 25 total points
ID: 10870889
You'll need to do a formula to convert it.  The timestamp is a numeric value, right?  So something like this should work:

DateAdd("s",{table.secondsfield},DateValue(1974,1,1))

Basically use the dateadd function to add the number of seconds stored in the db to the datevalue for the beginning date.
0
 
LVL 101

Assisted Solution

by:mlmcc
mlmcc earned 25 total points
ID: 10870957
Rather than having to create the formula for every report, you could build a User Function Library (UFL) and include it in your Crystal installation.

mlmcc
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

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…
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…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

635 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