FileDateTime

  • Thread starter Thread starter Daniel Jones
  • Start date Start date
D

Daniel Jones

Is there a way to return just the time from the FileDateTime method?

i.e. id like strA to return "5:00PM" instead of "11/30/09 5:00PM"

strA = FileDateTime("C:\Temp\Book1.xls")

Thanks!

D
 
Try something like

Dim FName As String
Dim D As Double
Dim TimeOnly As Double
FName = "C:\Book1.xls"
D = FileDateTime(FName)
TimeOnly = D - Int(D)
Debug.Print Format(TimeOnly, "hh:mm:ss")

Cordially,
Chip Pearson
Microsoft MVP 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com
[email on web site]
 
Back
Top