DateTime from ASP to SQL

Results 1 to 2 of 2

Thread: DateTime from ASP to SQL

  1. #1
    Abraham/Boulder, CO Guest

    Default DateTime from ASP to SQL

    I need to pass the datetime parameters to a sproc. When using Crystal 8 it will not accept dt only char. How can I code the asp to accept &#039;1/29/01 12:00:00am&#039; and &#039;1/29/01 1:59:59pm&#039; as start and end date, respectively?<BR><BR>I&#039;m new to asp and am cheating with Crystal. Your help would be great.<BR><BR>Regards.<BR><BR>Abraham/Evoke Communications.

  2. #2
    Kevitt Guest

    Default RE: DateTime from ASP to SQL

    When you call your sp, I assume you are passing the variables in.<BR>So, use cDate(myStartDate)..cDate(myEndDate) such as...<BR><BR>"exec mySProc &#039;" & cDate(myStartDate) & "&#039;" & cDate(myEndDate) & "&#039;"<BR><BR>Then in your SP, simply declare those input variables as datetime. (ie declare @myStartDate datetime)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts