|
-
Mar 21st, 2001, 06:21 AM
#1
Thread Starter
New Member
Hi,
I'm trying to add a date (user specified) to my SQL server using an ASP page with drop down menus to select day, month and a text with 2 characters for year.
Then I have a string to put them together as one variable and I am trying to use the function fromatdatetime to get the date into a valid format for the db (using datetime datatype).
My problem lies in how to split up the date terms. If i use forward slash it divides the numbers and if i use colons or full stops it displays as time.
I've seen this method of collecting date info millions of times on other web pages but I can't get it to work.
my code:
dim start
dim startd
start = Request.Form ("startd") & "." & Request.Form ("startm") & "." & Request.Form ("starty")
startd = FormatDateTime(start,3)
where startd is an optionbox for day, startm an option for month and starty a 2 character textbox for year.
Thanks for any advice
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|