Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Datetime Issue

Author  Topic 

aoriju
Posting Yak Master

156 Posts

Posted - 2010-12-21 : 02:11:07
Dear All,

I have a Small Problem About Datetime.
I am passing datetime format is dd/MM/yyyy.But SQL SERVER Format is MM/dd/yyyy. generally how to solve these issues at DB level

Thank s& Regards
Riju A.O

Sachin.Nand

2937 Posts

Posted - 2010-12-21 : 02:13:31
What exactly you want to do ? Compare the two dates?

PBUH

Go to Top of Page

aoriju
Posting Yak Master

156 Posts

Posted - 2010-12-21 : 02:16:36

If Worng Format comes from Front End ......Need to Identify the Correct format and Convert
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2010-12-21 : 07:57:12
You should always use proper DATETIME datatype and use unambigious format YYYYMMDD HH:MM:SS
Refer this for more informations
http://beyondrelational.com/blogs/madhivanan/archive/2010/06/03/understanding-datetime-column-part-ii.aspx

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -