0

Due to the constraints I have now, i am still using SQL server 2000 the problem is the client wants a report which should retrieve date variables (namely date_from and Date_to). the date should only consider the date part in crystal reports

Part of Crystal report

So the question here is, how can i make the crystal report, accept only the date part and not the time part.

EDIT: these are parameters, i need a data type that would accept only the date. and i am using SQL SERVER 2000. if i have to create a data type, how?

EDIT: @AndrewLazarus sorry sir for the late reply. i would like to have my variable of the crystal report to accept the date only sir. i am really sorry for the confusion. to show you what i mean, i would like to have somewhat something like this

enter image description here

i somewhat cut the picture from my screenshot above but i hope it may give you a picture

Mr.J
  • 430
  • 2
  • 10
  • 30
  • Fields in a report have a Format property – Andrew Lazarus Mar 14 '13 at 05:05
  • @AndrewLazarus Sir, how to locate that format, and could it format the above screenshot? how to do it sir? – Mr.J Mar 14 '13 at 05:28
  • The format is not of the variable; it is a property of the Field in the _form_. – Andrew Lazarus Mar 14 '13 at 06:22
  • @AndrewLazarus Sir, can you format parameters of a query in crystal report? – Mr.J Mar 14 '13 at 07:32
  • http://stackoverflow.com/questions/980877/crystal-reports-datetime-formatting – revoua Mar 14 '13 at 08:19
  • 1
    I think many of us were misunderstanding your question. We have been thinking you wanted to modify the formatted display of the parameter somewhere in the _output_. Now I am wondering if you want to use only the date part of some field as part of the _query_. For that, see http://stackoverflow.com/questions/113045/how-to-return-the-date-part-only-from-a-sql-server-datetime-datatype – Andrew Lazarus Mar 14 '13 at 16:46

1 Answers1

1

you can compare in report selection formula

http://publib.boulder.ibm.com/infocenter/radhelp/v7r5/index.jsp?topic=%2Fcom.businessobjects.integration.eclipse.designer.doc%2Fhtml%2Ftopic683.html

http://customerfx.com/pages/reporting/2009/11/19/working-with-the-datepart-function-in-crystal.aspx

or

you can define string parameter variable rather than date in sp in sqlserver (easy to manage in sqlserver) and pass datepart value to sqlserver from your code or in preview.

Ajay2707
  • 5,690
  • 6
  • 40
  • 58