Admin Production ni-theme
Current Publication

GetFileDate

LabWindows/CVI

GetFileDate

int GetFileDate (char fileName[], int *month, int *day, int *year);

Purpose

Gets the date of a file.

Example Code

/* Get the date of WAVEFORM.DAT. */
int month, day, year;
GetFileDate ("WAVEFORM.DAT", &month, &day, &year);

Parameters

Input
Name Type Description
fileName char [] The pathname of the file for which to get the date.

If you specify an empty string "", GetFileDate gets the file date found by the most recent call to GetFirstFile or GetNextFile.
Output
Name Type Description
month int The month component of the date.

Values
1—January
2—February
3—March
4—April
5—May
6—June
7—July
8—August
9—September
10—October
11—November
12—December
day int The day component of the date.

Values: 1 to 31
year int The year component of the date.

Values: 1980 to 2099

Return Value

Name Type Description
result int The result of the call.

Code Description
0 Success.
-1 File not found or directory in path not found.
-3 General I/O error occurred.
-4 Insufficient memory to complete operation.
-5 Invalid path, for example, c:filename.
-6 Access denied.

Additional Information

Library: Utility Library

Include file: utility.h

LabWindows/CVI compatibility: LabWindows/CVI 3.0 and later