Gets the DateTime.
The DateTime.
The DateTime is constructed from the directory list item's Date and Time values.
It assumes the date is in one of the following formats:
month day [year]
where the month is assumed to be one of Jan through to Dec and, if no year is supplied, then it defaults to being in the last 12 month period;
or:
mm-dd-yy
where mm is 1 through 12 and if the year is greater than 50, 1900 is added to it, otherwise 2000 is added.
It assumes the time is in one of the following formats:
hh:mm
where hh is 00 through 23
or:
hh:mm [AM | PM]
where hh is 1 through 12.
The time is optional and, if not present, will default to 00:00.
If the date and time aren't in the expected format an exception is thrown.
Dates and times in the FTP standard (RFC-959) are problematic. With some FTP servers, a date but no time is supplied so the date/time is inaccurate. Also, FTP servers often report the date and time in their local time rather than UTC (GMT). This means that if you wish to convert the date/time to local time at the FTP client, you need to know the time zone in which the FTP server is running.
For an alternative method for obtaining file times refer to the GetModificationTime method.
| Exception Type | Condition |
|---|---|
| FtpException | Thrown when the parsing of the date and time fails. |