Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I have a string from a textbox (request.form("date"))

Now I want to format that into a date format.

 

Reason I ask is when im preparing it for my SQL statement im doing this:

strDate = "# " & request.form("date") & " #"

 

This gives me "# 01/02/2004/ #"

However, it has problems gewtting into SQL Server like this. It seems to want it like this:

# 01 / 02 / 2004 # and not all closed up.

 

How can I format my string so that SQL server will take it?

Posted

Formatting

 

Ok, so if I want to format the request.form("date") string into a valid date style (i.e. dd/mm/yyyy).

so how would I do that?

Is it something like:

 

FormatDate(request.form("date")), dd/mm/yyyy) 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...