FutureBasic Logo

<<    Index    >> FutureBasic

date, date$   function



Syntax
CFStringDate = date( formatCFString )
PascalStringDate = date$( formatPascalString )

Description
date and date$ return a string based on the current date. A formatCFString or formatPascalString controls output formatting.

The formatCFString or formatPascalString must contain Unicode Date and Time symbols as shown below and found in Appendix I - Data & Time Symbols.

Example
NSLog( @"%@", date ) // default format MM/dd/yy
NSLog( @"%@", date(@"MMMM d, yyyy") )
NSLog( @"This is day %@ of the year", date(@"D") )

  04/01/18
  April 1, 2018
  This is day 91 of the year

See also
time; Appendix I - Data & Time Symbols