473,396 Members | 1,655 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,396 software developers and data experts.

Date in SQL: 1/1/1900

Greetings

I'm building an insert SQL statement then doing a response.write then
executing it
the Response.write is giving me something like the following:

"Insert into CustSalesRecTrns(
User_ID,customer,trnsdate,item,qty,SysRecordDate) Values
(0,30,6/9/2004,1456,234,234,0,0,6/9/2004)"

but when I go to browse the table in SQL Server Entrprise Manager it gives
me in the trnsdate and sysrecorddate the value: 1/1/1900

Could sombody help me?

Regards,
Jul 19 '05 #1
5 2178
It should be

"Insert into CustSalesRecTrns(
User_ID,customer,trnsdate,item,qty,SysRecordDate) Values
(0,30,'6/9/2004',1456,234,234,0,0,'6/9/2004')"
--
Roji. P. Thomas
SQL Server Programmer
"Ice Man" <eh***@hotmail.com> wrote in message
news:Oq**************@TK2MSFTNGP10.phx.gbl...
Greetings

I'm building an insert SQL statement then doing a response.write then
executing it
the Response.write is giving me something like the following:

"Insert into CustSalesRecTrns(
User_ID,customer,trnsdate,item,qty,SysRecordDate) Values
(0,30,6/9/2004,1456,234,234,0,0,6/9/2004)"

but when I go to browse the table in SQL Server Entrprise Manager it gives
me in the trnsdate and sysrecorddate the value: 1/1/1900

Could sombody help me?

Regards,

Jul 19 '05 #2
(a) You need delimiters around your dates (6/9/2004 is a very small number,
and this will be interpreted as a time only, so the date becomes the
default, 1900-01-01).

(b) Quit using ambiguous, regional date formats! For SQL Server, always
pass YYYYMMDD. This is the only safe format that is guaranteed not to
change June 9th to September 6th, somewhere down the stream.

--
http://www.aspfaq.com/
(Reverse address to reply.)


"Ice Man" <eh***@hotmail.com> wrote in message
news:Oq**************@TK2MSFTNGP10.phx.gbl...
Greetings

I'm building an insert SQL statement then doing a response.write then
executing it
the Response.write is giving me something like the following:

"Insert into CustSalesRecTrns(
User_ID,customer,trnsdate,item,qty,SysRecordDate) Values
(0,30,6/9/2004,1456,234,234,0,0,6/9/2004)"

but when I go to browse the table in SQL Server Entrprise Manager it gives
me in the trnsdate and sysrecorddate the value: 1/1/1900

Could sombody help me?

Regards,

Jul 19 '05 #3
Thanks a lot Guys it worked! :)
"Roji. P. Thomas" <la********@nowhere.com> wrote in message
news:up*************@TK2MSFTNGP12.phx.gbl...
It should be

"Insert into CustSalesRecTrns(
User_ID,customer,trnsdate,item,qty,SysRecordDate) Values
(0,30,'6/9/2004',1456,234,234,0,0,'6/9/2004')"
--
Roji. P. Thomas
SQL Server Programmer
"Ice Man" <eh***@hotmail.com> wrote in message
news:Oq**************@TK2MSFTNGP10.phx.gbl...
Greetings

I'm building an insert SQL statement then doing a response.write then
executing it
the Response.write is giving me something like the following:

"Insert into CustSalesRecTrns(
User_ID,customer,trnsdate,item,qty,SysRecordDate) Values
(0,30,6/9/2004,1456,234,234,0,0,6/9/2004)"

but when I go to browse the table in SQL Server Entrprise Manager it gives me in the trnsdate and sysrecorddate the value: 1/1/1900

Could sombody help me?

Regards,


Jul 19 '05 #4
Great, can you fix your system clock now?

--
http://www.aspfaq.com/
(Reverse address to reply.)


"Ice Man" <eh***@hotmail.com> wrote in message
news:#N**************@tk2msftngp13.phx.gbl...
Thanks a lot Guys it worked! :)
"Roji. P. Thomas" <la********@nowhere.com> wrote in message
news:up*************@TK2MSFTNGP12.phx.gbl...
It should be

"Insert into CustSalesRecTrns(
User_ID,customer,trnsdate,item,qty,SysRecordDate) Values
(0,30,'6/9/2004',1456,234,234,0,0,'6/9/2004')"
--
Roji. P. Thomas
SQL Server Programmer
"Ice Man" <eh***@hotmail.com> wrote in message
news:Oq**************@TK2MSFTNGP10.phx.gbl...
Greetings

I'm building an insert SQL statement then doing a response.write then
executing it
the Response.write is giving me something like the following:

"Insert into CustSalesRecTrns(
User_ID,customer,trnsdate,item,qty,SysRecordDate) Values
(0,30,6/9/2004,1456,234,234,0,0,6/9/2004)"

but when I go to browse the table in SQL Server Entrprise Manager it gives me in the trnsdate and sysrecorddate the value: 1/1/1900

Could sombody help me?

Regards,



Jul 19 '05 #5
Dear Aaron

My system clock is correct actually it's part of a network of more than 250
PCs that gets synchronized with a server at startup! Now while writing these
lines the time on my PC is 9:23 AM (I'm in Beirut/ Middle East)
the time Zone is Cairo +2 GMT but maybe it's the "daylight saving changes"
that is doing this to my PC
usually in winter we are +2 GMT but in summer we change our clock so it
become +3 GMT

So Aaron, what u think? is there something that I must to fix in my computer
settings so the newsgroup server can understand we are +3 GMT now?

Regards,
Elie Constantine.

"Aaron [SQL Server MVP]" <te*****@dnartreb.noraa> wrote in message
news:e%****************@TK2MSFTNGP11.phx.gbl...
Great, can you fix your system clock now?

--
http://www.aspfaq.com/
(Reverse address to reply.)


"Ice Man" <eh***@hotmail.com> wrote in message
news:#N**************@tk2msftngp13.phx.gbl...
Thanks a lot Guys it worked! :)
"Roji. P. Thomas" <la********@nowhere.com> wrote in message
news:up*************@TK2MSFTNGP12.phx.gbl...
It should be

"Insert into CustSalesRecTrns(
User_ID,customer,trnsdate,item,qty,SysRecordDate) Values
(0,30,'6/9/2004',1456,234,234,0,0,'6/9/2004')"
--
Roji. P. Thomas
SQL Server Programmer
"Ice Man" <eh***@hotmail.com> wrote in message
news:Oq**************@TK2MSFTNGP10.phx.gbl...
> Greetings
>
> I'm building an insert SQL statement then doing a response.write then > executing it
> the Response.write is giving me something like the following:
>
> "Insert into CustSalesRecTrns(
> User_ID,customer,trnsdate,item,qty,SysRecordDate) Values
> (0,30,6/9/2004,1456,234,234,0,0,6/9/2004)"
>
> but when I go to browse the table in SQL Server Entrprise Manager it

gives
> me in the trnsdate and sysrecorddate the value: 1/1/1900
>
> Could sombody help me?
>
> Regards,
>
>



Jul 19 '05 #6

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

Similar topics

2
by: avinash | last post by:
hello myself avinash i am developing on application having vb 6 as front end and sql server 7 as back end. when i use insert query to insert data in table then the date value of that query is...
2
by: teddysnips | last post by:
To set up the problem, paste this into QA: if exists (select * from dbo.sysobjects where id = object_id(N'.') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table . GO CREATE TABLE . ( ...
15
by: Khurram | last post by:
I have a problem while inserting time value in the datetime Field. I want to Insert only time value in this format (08:15:39) into the SQL Date time Field. I tried to many ways, I can extract...
7
by: rcamarda | last post by:
I wish to build a table based on values from another table. I need to populate a table between two dates from another table. Using the START_DT and END_DT, create records between those dates. I...
0
yasirmturk
by: yasirmturk | last post by:
Standard Date and Time Functions The essential date and time functions that every SQL Server database should have to ensure that you can easily manipulate dates and times without the need for any...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.