Android Question Get the date and time of a file

Discussion in 'Android Questions' started by vecino, Jun 9, 2015.

  1. vecino

    vecino Well-Known Member Licensed User

    Hi, I've searched the forums, but can not find.
    How I can get the date and time of a file?
     
  2. Mahares

    Mahares Well Known Member Licensed User

    Are you looking for this:
    Code:
    DateTime.DateFormat= "M/d/yyyy hh:mm:s a"
    Log(DateTime.Date(File.LastModified(File.DirRootExternal, "vecino.txt")))
     
    ilan, vecino and DonManfred like this.
  3. vecino

    vecino Well-Known Member Licensed User

    Thank you,
    I will use File.LastModified :)
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice