开发者

how to get datetimepicker value with Date and current time

开发者 https://www.devze.com 2023-01-04 16:05 出处:网络
i have used the GMDatepicker. i need to take the datetime value along with date. my code: DateTime dateval= ((GMDatePicker)GrdDynamicControls.FooterRow.FindControl(\"frmDateTime\")).Date;

i have used the GMDatepicker. i need to take the datetime value along with date.

my code:

DateTime dateval= ((GMDatePicker)GrdDynamicControls.FooterRow.FindControl("frmDateTime")).Date;

this gives me the date 6/26/2010 12.00pm. and not the current time.

how to get the date with current time over here....开发者_JS百科.???


If you want the current time, just:

dateval += DateTime.Now.TimeOfDay;

It's slightly odd to pick a different date but keep the current time though...

0

精彩评论

暂无评论...
验证码 换一张
取 消