Now
- gets current system date/time

Date/Time
(AmiBroker 4.30)


SYNTAX Now( format = 0 )
RETURNS STRING or NUMBER
FUNCTION Returns current date / time in numerous of formats:
  • format = 0 - returns string containing current date/time formatted according to system settings
  • format = 1 - returns string containing current date only formatted according to system settings
  • format = 2 - returns string containing current time only formatted according to system settings
  • format = 3 - returns DATENUM number with current date
  • format = 4 - returns TIMENUM number with current time
  • format = 5 - returns DATETIME number with current date/time
  • format = 6 - returns current DAY (1..31)
  • format = 7 - returns current MONTH (1..12)
  • format = 8 - returns current YEAR (four digit)
  • format = 9 - returns current DAY OF WEEK (1..7, where 1=Sunday, 2=Monday, and so on)
  • format = 10 - returns current DAY OF YEAR (1..366)
EXAMPLE AddTextColumn( Now(), "Current time");
SEE ALSO DATENUM() function , DATETIME() function , DATE() function , TIMENUM() function

References:

The Now function is used in the following formulas in AFL on-line library:

More information:

See updated/extended version on-line.