on 2007 Jul 15 6:21 AM
Post Author: ram323
CA Forum: General
How can I convert the parameter from Datetime data type to Only Date Parameter so that everytime the parameter prompt window pops-up, the user will only input the Date and not seeing the Time on the parameter prompt window..I am using Crystal Reports XI..and my stored procedure uses DateTime data type....Need Help!!! a step by step procedure will be greatly appreciated.....Thanks much....
Request clarification before answering.
Post Author: Esc2Xtc
CA Forum: General
Greetings qcheng,
I'm so sure I wrote a reply to this post yesterday, but I guess I must have closed the window before Posting it, since I don't see it online today.
Anyways, many thanks for taking the time out to send me your explanations along with examples to my problem. I did toy with the idea of using a text field earlier in my stored procedure parameter and having the same prompted to the user to receive a date input, but I had decided against it because a text field would not display a date picker control (that comes with the date and datetime fields) and this could introduce user errors.
Besides this, my report is country relevant, so with a text control, my users in the East might enter a date in the dd/mm/yyyy format while in the West it maybe entered in a mm/dd/yyyy format. I would have no way of knowing what they entered was correct or not.
I was actually looking for someway to:
-1- Either hide the time part of the datetime control in Crystal Reports, or
-2- Specify a date in the stored procedure rather than a datetime so that crystal reports links and prompts the user for a date without time.
I already have a small function in my stored procedure which sets the time portion of the datetime variable to "00:00:00" once it returns from Crystal Reports, so I never have a problem about the time no matter what the user enters.
However, I am begining to believe that the entire issue is a limitation of Crystal Reports / SQL Server. I guess I cannot have my cake and eat it too
Your solution is definitely a good one and I will move in that direction in case management decide that they want to go with a text control rather than a datetime control. In such a case I will prompt the user with an appropriate message "Enter a date in yyyy/mm/dd format" or such.
Thanks once again, and do post any solution to this if you should find one in the future.
~X
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 9 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.