I have a files list which contain the directory of file. I want to know file creation date of that files. I used fileInof.CreationTime. But It is not displayed creation date. How I can know about this.
'Get file info
Dim FileInfoVar As FileInfo = New FileInfo(Server.MapPath("~/Images/A.png"))
Dim DateVar as datetime = FileInfoVar.CreationTime
It didn't display real creation time. It displays like this 1/1/1611.
File.GetCreationTime gives you a DateTime object...which is of course a Date and a Time. Reading out the properties of the resulting object should give exactly what you need.
Edit: Looking at your editted question I seriously doubt that you are looking at the right file. Did you do a File.Exists first? The result you have now seems a bit weird.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.