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.
| Author |
Topic |
|
h2sut
Starting Member
40 Posts |
Posted - 2008-03-20 : 11:13:13
|
| cast([Birthdate]as datetime) [Birthdate], 01/12/2001I have created this query below to change it to the format mmddyyyy.I not sure were the birthdate goes at in this query.replace(convert(varchar(10), getdate(), 101), '/', '') |
|
|
elancaster
A very urgent SQL Yakette
1208 Posts |
Posted - 2008-03-20 : 11:16:28
|
| well, birthdate would replace getdate() ...but can i ask why? is it just presentation?Em |
 |
|
|
jhocutt
Constraint Violating Yak Guru
385 Posts |
Posted - 2008-03-20 : 11:16:40
|
| replace getdate() with BIRTHDATE"God does not play dice" -- Albert Einstein"Not only does God play dice, but he sometimes throws them where they cannot be seen." -- Stephen Hawking |
 |
|
|
jsmith8858
Dr. Cross Join
7423 Posts |
Posted - 2008-03-20 : 11:17:14
|
| Do not convert at all in SQL Server, just return the raw DATETIME value to your client application and do all the formatting you want there. That is the way databases and client tools were designed to interact.- Jeffhttp://weblogs.sqlteam.com/JeffS |
 |
|
|
h2sut
Starting Member
40 Posts |
Posted - 2008-03-20 : 11:22:49
|
Thanks for your help. To answer your question the client wants in the format of mmddyyy for export file.Thanks again for you helpquote: Originally posted by elancaster well, birthdate would replace getdate() ...but can i ask why? is it just presentation?Em
|
 |
|
|
|
|
|