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

combining date and time

Status
Not open for further replies.

jobillborf

Programmer
Feb 13, 2001
61
0
0
US
crystal reports version 9 read a access 2003 database

I have two fields in access both are Date Time Fields

one Water Shut Off date - ex 11/9/1996
two Water Shut Off time - ex 16:50

Is it possible to write a formula or use a function to combine both fields to one date time field in a report.

Thank You for your time
 
If one is a date and one is a time, then use:

datetime({table.shutoffdate},{table.shutofftime})

However, you described BOTH fields as being datetime, while displaying them differently, so I'm confused.

-LB
 
In access the field type is datetime for both fields even though field one is a date and field two is a time. Hope this helps.

Thank you for your time.
 
Well, if they are separate fields and both are datetimes and you want the date from one and the time from another, you would use:

datetime(date({table.field1}),time({table.field2}))

I think you should verify what there datatypes are in CR by right clicking on and browsing each field.

-LB
 
Thank you for spending some time on this thread. Its a great feeling knowing we can come to this site and obtain expert help.
God Bless, sincerely JOBILLBORF
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top