Using Time condition in Crystal Reports
In SelectionFormula Method for crystal report control placed on a VB Form
Our Trial - CrystalReport1.SelectionFormula = "{TableName.FieldName}= '6:31:32 PM'" is not working.
The Selected Field from the table is of Date/time Data Type with Long Time type Format.The Database is MS-ACCESS 7.0.The specimen data in the table for the field is 6:31:32 PM. The Report Screen is displaying some date - 12/30/99 instead of showing the time.There is no any option to specify the time format for the database field(Date / Time) dropped on to the report screen at design time.Kindly Suggest suitably.
Re: Using Time condition in Crystal Reports
Hi
I have never used this on 'Time'. For date this works: Use #yy/mm/dd# format. Ex Field = #99/2/10#
For time, 24hr format may be better: Try
{TableName.FieldName}= #18:31:32#
Ravi
Re: Using Time condition in Crystal Reports
If you are using Crystal 7, right click on the date field that you are using and go to "Format Field" and then go to "Date/Time" tab and at "Order" select either "Date/Time", "Time/Date", "Date" or "Time" and then format the date or time under their respective folder tabs. Or if you open the report and go to File --> Report Options, you can change the format of how the field is converted from Access but this is not flexible with formating.
Gary Caspelich
GaryCaspelich