| Author: Barani 05 Sep 2008 | Member Level: Silver | Rating: Points: 1 |
search for help by giving convert statement and i am sure u will get solution.serch in mssql2005 help
|
| Author: ANIL PANDEY 05 Sep 2008 | Member Level: Diamond | Rating: Points: 3 |
hi,
store the date value in a string and SPLIT the string in the like
String strDate = "2008-08-29 17:52:51.937 ";
string[] stDate = strDate.Split(" ");
stDate[0] will give Date n
stDate[1] will give u only the time part
Hope this will work for u ..
Regards, Anil
Thanks & Regards Anil Kumar Pandey
|
| Author: avtar 05 Sep 2008 | Member Level: Gold | Rating: Points: 3 |
Try :) this :)
declare @d datetime set @d = '2008-08-29 17:52:51.937' select @d
select cast(datepart(hh,@d) as varchar(2)) + ':' + cast(datepart(mm,@d) as varchar(2)) + ':' + cast(datepart(s,@d) as varchar(2))
SELECT RIGHT(CONVERT(VARCHAR(19), CONVERT(SMALLDATETIME, @d), 0),7);
|
| Author: Lakhan Pal 05 Sep 2008 | Member Level: Gold | Rating: Points: 1 |
SELECT CONVERT(VARCHAR(20),GETDATE(),108 )
Try Out This :)
|
| Author: suresh kumar 06 Sep 2008 | Member Level: Bronze | Rating: Points: 2 |
hi...for this u can use this.... tbx_TimeReceipt.Text = Date.Now.Hour.ToString + ":" + Date.Now.Minute.ToString + ":" + Date.Now.Second.ToString
|
| Author: Suba Ganesh 06 Sep 2008 | Member Level: Silver | Rating: Points: 2 |
declare @d datetime set @d = '2008-08-29 17:52:51.937' SELECT RIGHT(CONVERT(VARCHAR(19), CONVERT(SMALLDATETIME, @d), 0),7);
|