FileDateEx

Description:

baFileDateEx returns the date of a file or folder as a string.

Platforms:

Windows

Usage:

Result = baFileDate( FileName , DateType , DateFormat , TimeFormat )

Arguments:

String, string, string, string.
FileName is the file to get the date of.
DateType is the data to return. Can be one of:
    "created"
    "modified"
    "accessed"
DateFormat is the desired format of the date.
TimeFormat is the desired format of the time.

Returns:

String.
Returns the date of the file/folder, or an empty string if the file/folder doesn't exist.

Examples:

Director:
date = baFileDateEx( "c:\data\student.dat" , "created" , "dd-mm-yy" , "hh:nn:ss" )

Authorware:
date := baFileDateEx( "c:\\data\\student.dat" , "modified" ,"dd-mm-yy" , "hh:nn:ss" )
 

Notes:

The date format can consist of "d" for day, "m" for month, "y" for year.

The time format can consist of "h" for hours, "n" for minutes, "s" for seconds. (Note the "n" for minutes.)

A single letter ("d") returns the exact number eg "5".

A double letter ("dd") returns the number with a leading zero if required eg "05".

A triple letter ("ddd") returns the short name eg "Mon".

A quad letter ("dddd") returns the full name eg "Monday".

Any letters other than those listed above will returned as is - they can be used for separators eg "dd-mm-yy" returns "05-11-97"; "d mmmm, yyyy" returns "5 November, 1997"

If the format is an empty string, then the date or time will not be returned.

 

See also:

baFileDate
baSetFileDate
baFileAge
baFileVersion