473,320 Members | 2,000 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

insert DateTime to SQL 2000

Lam
hi
Does anyone know how to insert Date to SQL server 2000?
I used DataTime.Today.ToShortDateString()
it shows up "1/1/1900" in the database
how can I correct that?
also, how can I pull out the date and compare with a new date?

Thanks

Nov 17 '05 #1
1 6237
Hi,

Why not use the DateTime directly?

Use a parameterize query if you need it.

cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Lam" <ja**********@hotmail.com> wrote in message
news:On**************@tk2msftngp13.phx.gbl...
hi
Does anyone know how to insert Date to SQL server 2000?
I used DataTime.Today.ToShortDateString()
it shows up "1/1/1900" in the database
how can I correct that?
also, how can I pull out the date and compare with a new date?

Thanks

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

18
by: Robin Lawrie | last post by:
Hi again, another problem! I've moved from an Access database to SQL server and am now having trouble inserting dates and times into seperate fields. I'm using ASP and the code below to get the...
9
by: Martin | last post by:
Hello, I'm new with triggers and I can not find any good example on how to do the following: I have two tables WO and PM with the following fields: WO.WONUM, VARCHAR(10) WO.PMNUM,...
9
by: adi | last post by:
Hi all, Hope there is a quick fix for this: I am inserting data from one table to another on the same DB. The insert is pretty simple as in: insert into datatable(field1, field2, field3)...
2
by: maltchev | last post by:
i need to insert data from an xml file into sql server table. the xml file contains only one record. how to insert the data? how to map the names of the fields in the xml file and the table?...
10
by: Stefan Richter | last post by:
Hi, I am trying to enter data into a table, but I got problems with my sql statement. It's something like that: Dim now As String = DateTime.Now.ToString INSERT INTO table (date) VALUES(now)...
0
by: Scarab | last post by:
Hi all, When I use following sql to get data in stored procedure, error occurs: insert into #tmp EXECUTE dbo.prc_1 @date1,@date1 Here is the source code, Thanks CREATE TABLE ( NULL , ...
2
by: Dave | last post by:
I noticed that my tables are not storing the milisecond values that I am inserting. Is this a bug? If not, can someone please explain what is going or or point me to a resource so I can research...
6
by: rn5a | last post by:
During registration, users are supposed to enter the following details: First Name, Last Name, EMail, UserName, Password, Confirm Password, Address, City, State, Country, Zip & Phone Number. I am...
3
by: iKiLL | last post by:
Hi all I am having problems getting my SqlCeDataAdapter to Update the SQL Mobile Data base. i am using C# CF2. I have tried this a number of different ways. Starting with the command builder...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.