Re: MUGH-SQLCON date time format
- Hi Aneesh
Thanks a lot for sharing you knowledge....
aneesh <aneeshattingal@...> wrote:
SQL server always displays the date in the form of
'YYYY-MM-DD mm: ..... '.
Now about the second part , Your query returns you the
date format as 'mdy', this means, sql server will
treat the date you are giving in the format MDY.
so if you are inputting the date as '07-08-2006', it
can be the either Aug 07 or July 08. if the
dateformat is mdy, the first numeric part will be
taken as Month.
If you specify the dates like '2006-08-09' or
'20060809' , sql server won't go for the above
declare @date datetime
SET @Date = '07-08-2006'
--- virender jain <virender_jain77@...> wrote:
> select name ,alias, dateformatAneesh R.
> from syslanguages
> where langid =
> (select value from master..sysconfigures
> where comment = 'default language')
> Result is
> name alias format
> us_english English mdy
> but when i am checking in any table e..g
> select crdate from sysobjects it is showing
> result in yy mm dd format.
> 2000-08-06 01:29:12.500
> but as per the first query for in mdy so result
> should be like 08-06-2000 01:29:12.500...
> Please it is quite serious issue for me... next i
> might need to change the database level date format
> for a production database....as per application
> teams wants.....is it really feasible or should i
> have to ask them to make changes in queries....
> Please answer to all
> Do you Yahoo!?
> Everyone is raving about the all-new Yahoo! Mail.
> [Non-text portions of this message have been
Expert Exchange.com Genius SQL server
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
Stay in the know. Pulse on the new Yahoo.com. Check it out.
[Non-text portions of this message have been removed]