Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
How does on get SQLSERVER CE to save date in british format i.e dd-mm-yyyy?
Posted
Updated 22-Mar-14 0:38am
v2
Comments
Richard MacCutchan 22-Mar-14 6:59am    
You don't; you use proper DateTime fields in the database and in your code. The only time you need to have it formatted in a particular form is when you wish to display it on some output device.

1 solution

SQL
select convert(varchar,getdate(),103)


this returns UK Date Format 'dd/MM/yyyy'
 
Share this answer
 
Comments
Gbenbam 22-Mar-14 6:58am    
Pls can you kindly furnish me with links to documentation on this function.So that I do more detailed reading.
King Fisher 22-Mar-14 7:06am    
http://technet.microsoft.com/en-us/library/aa226054%28v=sql.80%29.aspx

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900