pandav
asked on
Date checking problem
Hi VB experts,
I'm doing one program and the must create the report based on 2 input dates by the user.
The problem is, i always want the user type in the dd-mm-yyyy format. But suppose the user enter 1-15-1998 and the next time the user enter 15-1-1998, the isdate function return as TRUE.
But i wanted always to be dd-mm-yyyy and the problem occurs when the user enter either dd or mm as <= 12.
2nd question
when i do filtering in the crystal report, the dd-mm-yyyy format gives problem in case of either dd or mm <=12. the system thinks that the first value is mm. but i want the system to see the first values as dd.
I hope some of you could help asap
Thank you.
bye
I'm doing one program and the must create the report based on 2 input dates by the user.
The problem is, i always want the user type in the dd-mm-yyyy format. But suppose the user enter 1-15-1998 and the next time the user enter 15-1-1998, the isdate function return as TRUE.
But i wanted always to be dd-mm-yyyy and the problem occurs when the user enter either dd or mm as <= 12.
2nd question
when i do filtering in the crystal report, the dd-mm-yyyy format gives problem in case of either dd or mm <=12. the system thinks that the first value is mm. but i want the system to see the first values as dd.
I hope some of you could help asap
Thank you.
bye
ASKER
Actually, the problem occurs when i use the date format function.
because , when the user enters 1-15-1998 and the next time the user enter 15-1-1998 , both are valid under isdate function.
Then when i do the date format, the value will be wrong .
because , when the user enters 1-15-1998 and the next time the user enter 15-1-1998 , both are valid under isdate function.
Then when i do the date format, the value will be wrong .
Hi,
how about date format settings in W95?
Bye.
how about date format settings in W95?
Bye.
I recently had the same problem. If you convert your date input from a textbox to a date, the format will be dependent on your Windows settings. If you use the calendar control (include MS Calendar control 8.0 in VB 5.0) to get the input dates, you'll always get them in the format you choose.
You can still display the dates in the textbox or a label if you want to.
I use Crystal Reports 4.6 and using Format(yourdate, "yyyy,mm,dd") before opening the reports works fine.
You can still display the dates in the textbox or a label if you want to.
I use Crystal Reports 4.6 and using Format(yourdate, "yyyy,mm,dd") before opening the reports works fine.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
1st question:
You can format the data input to start.
2nd question:
In the formula you use to filter data, can't you format also this dates?
I hope this helps.
Bye.