Converting a dat input from HTML form to SQL datetime format
Posted: Mon Feb 22, 2010 9:37 am
Hello,
I'm new to SQL and php in general but have come across a problem which i can see alot of people are having however, i can't seem to work out a way around my specific problem from online resources.
I have a simple HTML form which asks for a date from the user. the date is entered in the UK date format (dd/mm/yyyy). SQL Server obviously complains about this as it wants it in the standard datetime format.
How do i convert the user input date to the datetime format? Do i do this in the HTML? the PHP? or in the T-SQL?!
HELP.
S
I'm new to SQL and php in general but have come across a problem which i can see alot of people are having however, i can't seem to work out a way around my specific problem from online resources.
I have a simple HTML form which asks for a date from the user. the date is entered in the UK date format (dd/mm/yyyy). SQL Server obviously complains about this as it wants it in the standard datetime format.
How do i convert the user input date to the datetime format? Do i do this in the HTML? the PHP? or in the T-SQL?!
HELP.
S