|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
SQL Server Date Errors
Does anyone know how to format dates correctly so they are accepted by sql server. I am getting a bunch of errors whenever I try to (paticulary problems with turncating....) I haven't been able to find a real article addressing this either......maybe I am doing something obviously wrong. Any advice would be appreciated......
|
|
#2
|
||||
|
||||
|
Not sure what you could be doing wrong - there's not a great deal you can do to mess it up...
First things first: Datatypes = For 99.9% of cases, SQLServer Date fields should be set to 'smalldatetime'. This field allows you to store just the date, or the date & time. It's pretty flexible. Next, when inserting dates into a database, use single quotes (') around the value, unless you're using MS Access, in which case its the hash (#) symbol. What problems are experiencing? |
|
#3
|
|||
|
|||
|
SmallDateTime can post date & time at once.....I was under the impression that they could only handle on or the other.....I'll check it out--Thank you
|
|
#4
|
|||
|
|||
|
Just wanted to thank you.....the problem was that I was surrounding my stored procedure variable with appostrophes.....I have made like 6 insert stored procedures before.......this time I guess I had a memory lapse.....Thanks again stumpy
|
![]() |
| Viewing: Dev Articles Community Forums > Programming > ASP Development > SQL Server Date Errors |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|