Question Locked

Why Crystal Report Shows 12:59 instead of 13:00 on some computers?

0 helpful
4 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I am sending a recordset to crystal report 9 from vb6. the data in the dateTime Field in the recordset contain data 13:00 but in the preview of the crystal it shows 12:59 on some computers. is it related to some settings in the windows or settings of the report?

4 replies

by tony hopkinson

discrepancy. DateTime values are stored as doubles with the fractional part being the number of seconds since midnight.
Hard to say where this is going wrong, but checking the floating point value of the time at source and a good and bad destination might give you a clue.

Have a look for anything that's treating it as a single, also if anything is using variants, converts in them are local to each machine and depend on all sorts of dll hell.

Which is a point actually, a quick check for dll versions across good and bad machines might reveal a common denominator as well.

by elyazzi

i open the report designer. when i browse the data it shows 13:00 but when i preview the report it become 12:59. the report contain to many formulas i dont know if its related. i cant find the issue. if i close and reopen its 13:00 again

by tony hopkinson

The routines to display the data in the browser won't be the same ones that build the report content.

Presumably you are passing a datetime to the report and then formatting in the report.

Try doing the format in the sql

Convert(VarChar(5),[SomeTime],8)

It's not brill but it should give you a cue where to start looking.

This discussion is closed to new replies.