date format

L

Licass

i have this form field with a date returned from database. I like to
increment 7 days but it return invalid string type.
here is the code:

Request.Form("inicio"+7)

how can i manage that??
 
K

Kevin Spencer

Well, to start with, Request.Form("Anything") is a string, always.

Try:

DateAdd("D", 7, CDate(Request.Form("inicio"))

Also note that this will not work if the value from the form is not in a
format that can be converted to a Date.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Who is Mighty Abbott?
A twin turret scalawag.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top