Word or Excel Modified Date

Hello Creator’s,

Here you with the solution of How to get the modified date and time of Particular Word or Excel file.


Srenivasan Kannan

1 Like

Hi ,

I have tried using System.IO.File.GetLastWriteTime(" “) it does not shows valid date, shows garbage value of date something like this:
I also tried using System.IO.File.GetCreationTime(” ") same output .


Have you given the file path



@ig250097 I am getting the correct date and Time . Check Var type Date and Time

1 Like

Even i am also getting correct one only. @ig250097 please check your file and variable

1 Like

Please refer below image:

If you can advice me what is wrong in the program.


You should give the entire file path with extension of file.
Ex. (“C:\Program files\Mynewfile\sample.docx”)

Hi SrenivasanKanna

Thanks issue is resolved. I have given filename with extension(.txt) and it worked.

1 Like