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

Converting datetime fields???

Status
Not open for further replies.

PQTIII

IS-IT--Management
Sep 21, 2004
110
Is there a way to convert datetime fields to just date fields. I use a datetime parameter and in my database for some reason they use a datetime field that never changes from 12:00:00AM. When you use the parameter for a search unless you put the 12:00:00AM it misses the dates you want. This just becomes a pain. I just want to use the date option for parameters to get rid of the time part.

Thanks
pt

CR9
 
I suggest adjusting your record selection formulas, or perhaps using a SQL Expression to CAST/CONVERT to a date type if your database supports it.

If you're asking about databases and data types, please post the type of database and the connectivity used.

Example of the adjusted record selectionf ormula:

{table.date} > {?MyStartDate}-1
and
{table.date} < {?MyEndDate}+1

Crystal will figure the rest out from there.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top