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 Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Format a date string

Status
Not open for further replies.

Joe1010

Programmer
Joined
Dec 11, 2006
Messages
49
Location
US
My report is linked to a Unix database. The order date is coming up as a string type, it includes the seconds, and I can not filter by date. How can I convert the field to a date type?
Thanks
 
Can you post some sample data that you are getting?

~Brian
 
2005-06-24 12:29
2005-06-27 09:25
2005-06-27 09:05
2005-06-28 10:55
2005-06-22 10:06
2005-06-22 14:56
2005-06-20 15:06
2005-06-21 10:48
2005-06-16 10:10
2005-06-12 11:46
2005-06-12 11:51
2005-06-08 18:15
2005-06-08 18:49
 
Use this formula -

DateTimeValue ({TABLE.DATE_TIME_STRING})

That will convert your DateTime String to a true DateTime Value.
 
Using this formula will take hours to run the report. I have millions of records. My understanding is that the report takes all records, converts it to date, then if filters by date. Am I correct?

Thanks
 
Yes, the conversion is taking place on the report-side so it would assess all records when it was trying to filter.

There might be a way to create a Stored Procedure directly on your database to do the conversion on the DB-side, then connect your report to the Stored Procedure.

I don't know enough about UNIX to post any additional info...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top