|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
You don't need a fax machine to get faxes. Get a fax-to-email fax number from CallWave. Try it free.
|
|
#1
|
|||
|
|||
|
I am using Crystal Reports and am trying to convert a datetime field to a date field during the select statement as I want to be able to search between two user defined parameters
My SQL reads SELECT "ES_EVENT"."EVENTUID", "ES_EVENT"."CREATED" FROM "ES_EVENT" "ES_EVENT" WHERE ("ES_EVENT"."CREATED">={?dtBegin} AND "ES_EVENT"."CREATED" <={?dtEnd}) "ES_EVENT"."CREATED" is the DateTime field and I want the parameter dtBegin and dtEnd to be date only so the user does not have to specifiy the time.....alternately I could look at converting the date parameters to date time...any thoughts Last edited by KathyW : September 14th, 2004 at 04:41 PM. Reason: Spelling Error |
|
#2
|
|||
|
|||
|
Quote:
Please Try this Your dtBegin and dtEnd fields are DATE type so you want to convert it to DateTime, which has to be recognize by SQL Server? If I'm correct, b4 passing the dtBegin and dtEnd to youe SELECT statement, try to convert in to DataTime using SQL CONVERT function. Ex: CONVERT (datetime, dtBegin, 103) to another temp datetime typr variable. 103 means : dd/mm/yy Please let me know, how did u go Raj |
|
#3
|
|||
|
|||
|
Thanks for that
![]() I managed to find a solution by creating the following user defined formula in the Select Expert function of the report within the report itself : {Command.CREATED} in DateTime (DatePart("yyyy",{?Report_Start_Date}), DatePart("m",{?Report_Start_Date}), DatePart("d",{?Report_Start_Date}), 00, 00, 01) to DateTime (DatePart("yyyy",{?Report_End_Date}), DatePart("m",{?Report_End_Date}), DatePart("d",{?Report_End_Date}), 23, 59, 59) |
|
#4
|
|||
|
|||
|
passing parameters to stored procedure thru crystal reports by taking add command
Hi All
I am trying to create crystal reports. In this concern i have created a command which execute a stored procedure. This stored procedure takes three parameters which in turn i want to pass it from .aspx page. when i click on button parameters should pass to that stored procedure. for example exec sp_example @date='{?selecteddate}' here date (varchar in stored procedure) and selected date (string type i selected) whenever i am adding this command in add command (which is there field explorer -> database fields) it's saying failed to open a row set. syntax error for converting datetime to string. if you have any idea please do reply. Regards request. |
|
#5
|
|||
|
|||
|
Trying your solution with no luck, Can you help?
Quote:
Kathy, can you give any more details on how you solved the date time issue, I want to only give the option of date to the end user just like you. Any more details would help a great deal. |
![]() |
| Viewing: Dev Articles Community Forums > Databases > General SQL Development > DateTime to Date with Crystal Reports/ Interbase |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|