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!

use timestamp in crystal

Status
Not open for further replies.

michalmar

Programmer
Aug 24, 2003
4
US
I'm trying to make a report on a table which has fields of timestamp, but when I open the report - I can't see the timestamp fields. Does somebody know how can I get them?
 
Make sure the report is set up for datetime fields. Go to file->report options->and make sure tht convert date-time field reads "to date-time", not "to date".

You can also right click on the time-stamp field->format field->datetime->set the format to the display you want.

-LB
 
You should post technical information when posting.

I'll assume that the timestamp is in an Oracle database, and that you're using an older version of Crystal, such as 8.5 or below.

A timestamp with timezone wasn't invented when CR 8.5 was released, so create a SQL Expression (Insert->Field Object->Right click SQL Expression) and cast it to a datetime:

cast(table.field as datetime)

If this isn't the case, try posting technical information when requesting it, inclusive of example data.

-k
 
I tried the first solution, and I saw that the report is already set up for datetime fields.
some technical information about my problem:
I have a table with some fields
(for this example - 4 fields: date, varchar2(10) and 2 fields of timestamp). My purpose is to find the different between the two dates.
The problem is that when try to create the SQL expression, the crystal knows only the 2 first fields, and don't know the timestamp fields. I can use "cast" or even just show that field. In the formula editor, I get the message "no errors found", but when I try to drag the formula into the report, the crystal crashes, and closed.
about the version - I fo have version 8.5.
I hope it's anough.
Michal.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top