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

DateTime Fields hh:mm:ss:ff

Status
Not open for further replies.

RachelK

Programmer
Mar 18, 2002
171
GB
I have designed a report in cystal that runs fine for me, I published it on the intranet and I am now getting an error message to do with date time when I run the report on the intranet or my collegues machine. I have found the problem but I do not know how to solve it. When I click on show sql query I have
SYCALNDR."PERIOD_END_DATE" >= {ts '2003-05-30 00:00:00'} AND
SYCALNDR.&quot;PERIOD_END_DATE&quot; <= {ts '2003-05-30 23:59:59'}

When my collegue opens the report on his machine he has an addition 00 at the end so mine reads hh:mm:ss and his ts reads hh:mm:ss:ff, when he corrects the format by deleting the 00 ff, the hundreth of a second and the report runs. I can't find out in crytal where the setting for the hundreth of a second is. When I click on file option datetime filed it only has yyyy mm dd hh mm ss it doesn't go further any idea's.
 
Whenever you have problems with any sort of programming comparisons, a good thing to try is running a convert on both sides and then try it.


So for your example, try this:
DateTimeValue(SYCALNDR.&quot;PERIOD_END_DATE&quot;) >= DateTimeValue('2003-05-30 00:00:00') AND
DateTimeValue(SYCALNDR.&quot;PERIOD_END_DATE&quot;) <= DateTimeValue('2003-05-30 23:59:59')
 
I'm taking a wild stab.

Go to File/Options.... On the Reporting tab, in the &quot;When reading data, Set the option to &quot;Keep Date-Time type&quot;.

At the very least, set it to the same as yours if they are different.

Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top