Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB.net and MSSQL Dates

Status
Not open for further replies.

WJProctor

Programmer
Jun 20, 2003
151
0
0
GB
Hi there, im having such a carry on with dates. I have 2 tables, both which have a date coloumn in them. Set to datetime. When dates are inserted they seem to store in the same way. I.e. MM/DD/YYYY.

When i read the dates back, one table works fine and returns 9/1/2004 if i then ask for the month it gives me 9 and year 2004. How ever with the other table it returns 08/01/2004 and if i ask for month then it gives me 01 and year 2004. Why when im doing exactly the same in the code is the other parts not working. Am i setting something wrong in the database.

Hope someone can help me out.

Regards


James Proctor

 
Sounds like your locale settings are different on the two SQL boxes.

Phil Hegedusich
Senior Web Developer
IIMAK
-----------
Boy howdy, my Liberal Studies degree really prepared me for this....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top