[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
##############################################################################
###+--------+#################################################################
#+-| TIME() |------------------------------------------------------+##########
#| +--------+ Returns an 8 character representation of system time |##########
#+-----------------------------------------------------------------+##########
##############################################################################
##############################################################################
#+--| Summary |----------------+##############################################
#| #INCLUDE system.hdr |##############################################
#+-----------------------------+##############################################
##############################################################################
##############################################################################
#+--| Syntax |--------------------------+#####################################
#| FUNCTION CHAR time PROTOTYPE |#####################################
#+--------------------------------------+#####################################
##############################################################################
##############################################################################
########+---| Description |-----------------------------------------+#########
########| The time() function returns an 8 character representation |#########
########| of system time in the format "HH:MM:SS". HH represents |#########
########| the number of hours from midnight and is in a 24 hour |#########
########| sequence. That is, 3:50pm is returned as the string |#########
########| "15:50:00". |#########
########+-----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+--| Example 1 |-------------------------------------------+#########
#########| * Print the current time. |#########
#########| |#########
#########| ? "Current time is: ", time() |#########
#########+----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+--| Example 2 |-------------------------------------------+#########
#########| * Calculate the number of seconds elapsed |#########
#########| * between a start time and an end time. |#########
#########| |#########
#########| FUNCTION LONG seconds |#########
#########| PARAMETERS CONST CHAR time_string |#########
#########| |#########
#########| RETURN i_val(substr(time_string,1,2)*3600 + ; |#########
#########| i_val(substr(time_string,4,2)*60 + ; |#########
#########| i_val(substr(time_string,7,2) |#########
#########| ENDPRO |#########
#########| |#########
#########| FUNCTION LONG total_seconds |#########
#########| PARAMETERS CONST CHAR stime, CONST CHAR etime |#########
#########| |#########
#########| RETURN seconds( etime ) - seconds( stime ) |#########
#########| ENDPRO |#########
#########+----------------------------------------------------------+#########
##############################################################################
See Also:
at()
substr()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson