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")))
     
    vecino and DonManfred like this.
  3. vecino

    vecino Well-Known Member Licensed User

    Thank you,
    I will use File.LastModified :)
     
Loading...