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

TIMESTAMP will not return time

Status
Not open for further replies.

iaminformed

Programmer
Mar 14, 2007
2
US
I am trying to return both the date and time from a timestamp field in a crystal report from sql database.

Timestamp is datetime variable in sql which show 2007-03-14 15:59:14.263 in sql, but only the date returns in crystal reports.
 
Sounds like you have "convert data-time to date" set under file, options. Or maybe this is just formatted as a date.

Please remember to ALWAYS post your crystal version.

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"If you have a big enough dictionary, just about everything is a word"
--Dave Barry
 
Version: Crystal Reports XI

I used the formula:
DateTimeValue({table.field})
returns
2007-03-14 12:00:00AM

I need it to return 2007-03-14 15:59:14 instead

 
2007-03-14 15:59:14.263 " does not look like a MySQL datetime value. What is the ".263" at the end?

If the value in the field is already datetime, you don't need to use DateTimeValue({table.field}), you simply use the value in the field, no need to convert it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top