Re: date format.

From: Raymond D'Anjou \(raydan\) (raydan_at_canatrade.nospamcom)
Date: 04/14/04


Date: Wed, 14 Apr 2004 10:24:07 -0400

Two suggestions:
Use a calendar and have the user click on a date (valide date garanteed)
Use three separate fields for Year/Month/Date (you will still have to
validate the date)

"Paul" <anonymous@discussions.microsoft.com> wrote in message
news:6CE196D2-EEF6-4DEA-8608-04DE64115DEF@microsoft.com...
> I have a form in my web page that everyone enters in a date and clicks
submit. On the click of submit button the date is sent to the sql server
and runs a stored procedure. My problem is that everyone enters the date in
a dd/mm/yy format. The sql server needs the date to be entered in a
yyyy/mm/dd for the stored procedure to run.
>
> Is there any code which I can run in order to change the date format
around (FROM dd/mm/yy -- TO -- yyyy/mm/dd) on the onclick event of the
submit button on my form.
> The html code for my form is as follows
> <form action="" method="post" name="accounting" id="accounting"><input
name="date" type="text" id="date"><input type="submit" name="Submit"
value="Submit"></form>
>
> I would really appreciate any help anyone can give to me as I am very new
to any type of coding and find it difficult doing some of the simple things.
> Thanks
> Not even sure if asp is needed to do this. All I know is the page is as
asp.