DateTime and stored procedure

Results 1 to 2 of 2

Thread: DateTime and stored procedure

  1. #1
    Sv Guest

    Default DateTime and stored procedure

    Hello to everybody!<BR>I need help.<BR>In me variable I have a string which represents time and date (looks like Tue Nov 14 13:26:39 UTC+0200 2000).<BR>I&#039ve got it by<BR>var date1 = new Date();<BR>And I need to pass this variable as a parameter to a stored procedure<BR>var timeL = oCmd.CreateParameter("u_logintime",135,1,0,date1); <BR>oCmd.Parameters.Append(timeL);<BR>135 represents type DBTIMESTAMP. <BR>@u_logintime has type datetime in my procedure and my date1 must be the same type.<BR>But in my date1 I have a string and not an datetime object. That&#039s why I&#039ve got an error about wrong types. <BR>How can I pass datetime object as a parameter? Or how can I write it directly to table in field with type datetime?<BR>Are there some convertors?

  2. #2
    Join Date
    Dec 1969

    Default RE: DateTime and stored procedure

    Have you tried using 7 (adDate) instead of 135 (dbTimeStamp) ...<BR><BR>Also exactly what error do you get? and on what line of code exactly (post code leading up to error)...<BR><BR>

Posting Permissions

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