Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 242
  • Last Modified:

ASP Stored Procedure DATE Default Value

Hello, I'm building an ASP stored procedure to do an insert & then return a recordset,... one of the lines inserts into a date column, what I would like to do is give it a default value of Today -1day if no value is submitted ---

The relevent lines on the SP currently looks like -

Dim CMDProductInsert__availabledate
CMDProductInsert__availabledate = "dat"
if(UploadFormRequest("availabledate") <> "") then CMDProductInsert__availabledate = Server.HTMLEncode(ProtectSQL(UploadFormRequest("availabledate")))

Open in new window


Where "dat" is where I want the default value to go...

Thanks
0
garethtnash
Asked:
garethtnash
  • 2
1 Solution
 
OnALearningCurveCommented:
Hi garethtnash,

Try:

CMDProductInsert__availabledate = DateAdd("d", -1, Now())

Hope this helps,

Mark.
0
 
garethtnashAuthor Commented:
Thank you
0
 
OnALearningCurveCommented:
Glad I could help
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Build your data science skills into a career

Are you ready to take your data science career to the next step, or break into data science? With Springboard’s Data Science Career Track, you’ll master data science topics, have personalized career guidance, weekly calls with a data science expert, and a job guarantee.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now