Feeds:
Posts
Comments

Posts Tagged ‘system time’

getSeconds() and getMIlliseconds() return the seconds and milliseconds values.
<SCRIPT LANGUAGE=”JAVASCRIPT”>
<!–
var d = new Date();
var curr_hour = d.getHours();
var curr_min = d.getMinutes();
var curr_sec = d.getSeconds();
var curr_msec = d.getMilliseconds();
document.write(curr_hour + “:” + curr_min + “:”
+ curr_sec + “:” + curr_msec);
//–>
</SCRIPT>

Read Full Post »

In order to retrieve the current system time, we can use the static property “Now” of the ” DateTime” class. For example the following two lines of code
DateTime currentSystemTime = DateTime.Now;

Console.WriteLine(currentSystemTime);

print out something like this:

4/7/2008 4:05:35 PM

Read Full Post »