LogiView

Function 'date'

     

This function returns a string with the current date.

The default format for the date string is the database format, i.e. 'Y-M-D H:M:S'. With an optional string type argument format can be defined for the for the date to be returned.

Remember to always use the database format when accessing date type database fields. Optional parameters have been provided mainly for formatted output of dates in user forms.
 

Syntax:

 

{DAT_VAR | STR_VAR}= date() or
{DAT_VAR | STR_VAR}= date({STR_EXPR})

 

I/O parameters:

{STR_EXPR} Date format definition. This string may contain the following characters:
D day, two digits
M Month, two digits
A Month, three digits ("JAN", "FEB", ..."DEC")
Y Year, four digits
H Hours, two digits
M Minutes, two digits
S Seconds, two digits
-  
 

Return value:

 
{DAT_VAR|STR_VAR} output date
 

Example:

  Declaration of Variables
 
10 DOCU_STRING_1=date()
20 put(DOCU_STRING_1)
10 DOCU_STRING_1=date("D.M.Y H:M:S")
20 put(DOCU_STRING_1)

Result:

Result:

You need to add the time format (H,M,S) whenever arguments are being used.

Functions and commands: Date and Time