Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 transfering Datetime to StoredProcedure

Author  Topic 

pelegk2
Aged Yak Warrior

723 Posts

Posted - 2006-10-22 : 04:05:45
i wan from asp to send Date to a SP
in the SP i have defined :
Date1 DateTime=null
and i try to do :
sp_name @date1='10/10/2006'
and i recive an error that cant convert cahr to date time
what to do?
thnaks in advance
peleg

Israel -the best place to live in aftr heaven 9but no one wan't to go there so fast -:)

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-10-22 : 04:10:51
specify the datetime in universal format YYYYMMDD

or use set dateformat to set to your date format mdy or dmy

KH

Go to Top of Page

pelegk2
Aged Yak Warrior

723 Posts

Posted - 2006-10-22 : 04:39:02
thnaks alot

Israel -the best place to live in aftr heaven 9but no one wan't to go there so fast -:)
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-10-22 : 22:48:00
Changing Dateformat is not advisable

Refer this to know more about handling Dates
http://www.sql-server-performance.com/fk_datetime.asp


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

pelegk2
Aged Yak Warrior

723 Posts

Posted - 2006-10-25 : 14:52:11
thanks all

Israel -the best place to live in aftr heaven 9but no one wan't to go there so fast -:)
Go to Top of Page
   

- Advertisement -