DateLastModified Property

Object: SoftArtisans.SAFile
Syntax: DateLastModified
Type: Date
Read/Write: Read Only
Description:

If UseDateLastModified is set to True, DateLastModified will return the last modification date of the file transmitted by the user. The date is displayed using the local time zone. To display the UTC date of the file, see the DateLastModifiedUTC property.

The DateLastModified property only works if the client-upload software sends this information. Neither Netscape Navigator nor Microsoft Internet Explorer send the file's modification date. SoftArtisans XFile transmits this information by inserting the "X-Last-Modified" header in the Request, when XFile's [XFRequest].UseXLastModified property is set to True.

Sending the needed header:

If you are using a different upload client, use the following header to send the Last Modified date:

date-time = day date time 4DIGIT ; Dow Mmm dd hh:mm:ss zzz yyyy day = "Mon" /
            "Tue" / "Wed" / "Thu" / "Fri" / "Sat" / "Sun" date = month 2DIGIT ; month day month
            = "Jan" / "Feb" / "Mar" / "Apr" / "May" / "Jun" / "Jul" / "Aug" / "Sep" / "Oct"
            / "Nov" / "Dec" time = hour zone ; ANSI hour = 2DIGIT ":" 2DIGIT ":" 2DIGIT ; 00:00:00
            - 23:59:59 zone = "UT" / "GMT" ; Universal Time 

The file modification date is always sent in GMT format to account for time zone differences between the browser and server.

See also: FileUp.DateLastModified.



Examples:

ASP The Date Last Modified of the first uploaded file is:
<%=fileUpload.Form("File1").DateLastModified%>.
C# results.Append("The Date Last Modified of the " +
"first uploaded file is: " +
((DateTime)((SaFile)fileUpload.Form
["File1"]).DateLastModified).ToString());
VB.NET results.Append("The Date Last Modified of the " + _
"first uploaded file is: " +
CType(CType(fileUpload.Form("File1"), _       SaFile).DateLastModified, DateTime).ToString())

Copyright © 2010 SoftArtisans, Inc. All rights reserved.