I have a files list which contain the di开发者_开发百科rectory 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.
精彩评论