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
 Date Format

Author  Topic 

SQLNoob81
Starting Member

38 Posts

Posted - 2010-11-29 : 05:01:00
Hi Guys.

All my SQL fields after Importing from Access are in the following format yyyy-MM-dd. How can I set my default format on all tables to dd/MM/yyyy as they were in Access?

nigelrivett
Master Smack Fu Yak Hacker

3385 Posts

Posted - 2010-11-29 : 05:07:16
They're probably not in that format - that's just how they are converted for display. They will be stored as two binary fields.
To display in that format
select convert(varchar(8),col,103)

Have a look at the convert statement in bol.
Access is part database and part client application - sql server is more dtabase oriented - you will have to deal with client applications separately.

==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2010-11-29 : 06:02:43
Make sure to read these
http://beyondrelational.com/blogs/madhivanan/archive/2010/06/03/understanding-datetime-column-part-i.aspx
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 -