|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
||||
|
||||
|
Hello everyone, I am wondering what is the best to use. I am inserting a date... not a date & time so was wondering what would be easier... using a varchar for the date or using the datetime data type.
I have to do error checking anyways so why not just use a varchar. Does a varchar use more space (bytes) than datetime or is there a good reason to use it in my case? Thanks, Gerbill P.S. Also I am storing the time seperate from the date which is partly why I am asking this. Should I grab the date & time and store them together?
__________________
Open source to the open minded... |
|
#2
|
|||
|
|||
|
Use datetime. To format the date, use the convert function.
|
|
#3
|
||||
|
||||
|
ok that is good enough for me...
is there any outstanding reason for this... I mean I have read up on the values of using the correct data types but not much is said about the datetime and why it should be used. Thanks, Gerbill |
![]() |
| Viewing: Dev Shed Forums > Databases > MS SQL Development > Inserting Date into MS SQL - Data type to use? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|