Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

asp problem with selection record using date field

Status
Not open for further replies.

minditx

MIS
Jul 31, 2003
9
MY
hi there

i'm using sql server as database and crystal report 7. i try using produce report by web using asp code. for string selection record it ok.but while i'll change the code for date field it will appear some error?

Error in formula <Record Selection>.'{stock.date_stk}='31/12/2003&quot; A date-time is required here.

my code like :

value = &quot;31/12/2003&quot;
SelectionFormulaValue = &quot;{stock.date}='&quot;&cstr(value)&&quot;'&quot;
Session(&quot;oRpt&quot;).DiscardSavedData
Session(&quot;oRpt&quot;).RecordSelectionFormula = cstr(SelectionFormulaValue)

' actually i want user just key date on value than report data will be display on date selection.

'if you have any idea or sample code it's will be appreciate

thanks
 
Try something like:

&quot;{stock.date}=cdate('&quot; & value & &quot;')&quot;

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top