Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi D
strA = Format((FileDateTime("C:\Temp\Book1.xls")), "h:mmAM/PM") Regards, Per "Daniel Jones" skrev i meddelelsen ... 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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
strA = Split(FileDateTime("C:\Temp\Book1.xls"), " ")(1)
RBS "Daniel Jones" wrote in message ... 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 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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] On Mon, 30 Nov 2009 12:08:55 -0800 (PST), Daniel Jones wrote: 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 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
One more method...
strA = TimeValue(FileDateTime("C:\Temp\Book1.xls")) -- Rick (MVP - Excel) "Daniel Jones" wrote in message ... 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
FileDateTime help | Excel Programming | |||
FileDateTime function - how to make it authomatic? | Excel Programming | |||
Put only date (not time too) in variable from FileDateTime function | Excel Programming | |||
FileDateTime for Internet web page | Excel Programming |