Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Selecting dates in a Web form
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01229139
Message ID:
01229155
Views:
30
Hi Kevin.
Tried that and it works..up to a point.
I have got the Session varaibales stored as date fields now ok int the Called form, but cannot get the select to work:
Keep getting a :-
Conversion failed when converting datetime from character string

x="Select * from MyTable where MyDate" + " >= " + ?????? ldDate
I am unsure what syntax to use with the date
Do I need to convert the ldDate to a string ?


regards,
Gerard




>Hi, Gerard,
>
>You should be able to store datetime values in Session Variables.
>
>
>DateTime dtToday = DateTime.Today;
>Session["SessDate"] = dtToday;
>
>DateTime dt2 = (DateTime)Session["SessDate"];
>
>
>I'd recommend passing them as parameters to a data access layer.
>
>Hope that helps...
>Kevin
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform