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 |
|
ganeshkumar08
Posting Yak Master
187 Posts |
Posted - 2008-07-01 : 03:01:47
|
| Hi,I have problem in sending Formatted Date as Datetimedatatype as result set from DB to Front end.i.e, i Converted the Getdate() as yyyy/mm/dd format as below. select convert(varchar,getdate(),111)The above date is converted to varchar and send it as varchar datatype to front end.But i need to send it as datetime datatype with same style, the style should not change.Is it possible to send it as datetime datatype...Thanks GaneshSolutions are easy. Understanding the problem, now, that's the hard part |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2008-07-01 : 03:03:37
|
"The above date is converted to varchar and send it as varchar datatype to front end. Is it possible to send it as datetime datatype..."just don't convert it and perform the required formatting in your front end. KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
ganeshkumar08
Posting Yak Master
187 Posts |
Posted - 2008-07-01 : 03:06:25
|
| In front end they are binding in list view, so List view takes the datatype automatically which the result set has. |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2008-07-01 : 03:09:07
|
quote: Originally posted by ganeshkumar08 In front end they are binding in list view, so List view takes the datatype automatically which the result set has.
So if you don't convert your datetime to string it will remain as datetime data type. Isn't this what you wanted ? KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
ganeshkumar08
Posting Yak Master
187 Posts |
Posted - 2008-07-01 : 03:10:23
|
| but i want output with yyyy/mm/dd style.. |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-07-01 : 03:40:44
|
quote: Originally posted by ganeshkumar08 but i want output with yyyy/mm/dd style..
do this formatting while displaying the data. |
 |
|
|
|
|
|
|
|