Date and time
-
May i know wat is the syntax to use to get the current date and current time. Sometime like that: Date = CurrentDate time = CurrentTime it is urgent pls help...
Use
DateTime.Today
for just the date, andDateTime.Now
for the date and time. See here for more information. -
May i know wat is the syntax to use to get the current date and current time. Sometime like that: Date = CurrentDate time = CurrentTime it is urgent pls help...
date = now or now.date date = now.timeofday
nothing is impossible.....
-
Use
DateTime.Today
for just the date, andDateTime.Now
for the date and time. See here for more information. -
And if i just wan the time only? btw wat should i add so tt the format of the date is 20-11-2006 and the time is 17:36?
For just the time, use
DateTime.Now.ToShortTimeString
. And for the date, useDateTime.Now.ToShortDateString
.