Wiki source for KeyPgNow


Show raw source

{{fbdoc item="title" value="NOW"}}----
Gets the current system time as a [[ProPgDates|Date Serial]]

{{fbdoc item="syntax"}}##
[[KeyPgDeclare|declare]] [[KeyPgFunction|function]] **Now** ( ) [[KeyPgAs|as]] [[KeyPgDouble|double]]
##
{{fbdoc item="usage"}}##
#include "vbcompat.bi"
//result// = **Now**
##
{{fbdoc item="ret"}}
Returns a date serial containing the system's date and time at execution time.

{{fbdoc item="desc"}}
As the time is the decimal part of a date serial, if the value of **Now** is saved to an integer, the time in it will be reset to 00:00:00

The compiler will not recognize this function unless ##vbcompat.bi## is included.

{{fbdoc item="ex"}}
{{fbdoc item="filename" value="examples/manual/dates/now.bas"}}%%(freebasic)
#include "vbcompat.bi"

dim a as double = now()

print format(a, "yyyy/mm/dd hh:mm:ss")
%%

{{fbdoc item="diff"}}
- Did not exist in QB. This function appeared in PDS and VBDOS

{{fbdoc item="see"}}
- [[ProPgDates|Date Serials]]

{{fbdoc item="back" value="CatPgDate|Date and Time Functions"}}
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki



sf.net phatcode