Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert CR Date/Time to UTC

Status
Not open for further replies.

SR24

Programmer
Jan 14, 2005
19
US
I created a report off a Sybase data base that has a Date/Time field which I believe is considered UTC format. The guide says the field is seconds since Jan. 1, 1970. I created the following formula named @TimeConvert so I read it in my report:

WhileReadingRecords;

DateAdd('s',{d_feed_time.interval_tstamp},CDATETIME(1970,01,01,0,0,0))

Currently, I am basing my Record Selection off this fomula which is extremely slow since CR has to read through all of the records before it does it's selection.

I have set up parameters for the user to enter a Start Date/Time (?StartDate) and End Date/Time (?EndDate). I would like to convert the Date/Time entries from the parameters back to the UTC format to use them in my Record Selection which hopefully will speed things up.

To make a long story short, how can I convert a CR Date/Time format to a UTC format (seconds since 1/1/1970)?

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top