Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / January 2006

Tip: Looking for answers? Try searching our database.

Put only date (not time too) in variable from FileDateTime function

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mikeburg - 21 Jan 2006 19:34 GMT
What would be the syntx for the variable, dtFileDate to contain only the
date (not the time) from the FileDateTime function?  For example put
1/21/2006 in the variable dtFileDate when FileDateTime is 1/21/2006
11:57:16 AM?

In other words, from:
dtFileDate = FileDateTime("C:\USR\MIKE\AT0158.MB")

I need dtFileDate to contain only the date 1/21/2006 (not the time
11:57:16 AM, too).

Thanks so very much.  mikeburg

Signature

mikeburg

Bob Phillips - 21 Jan 2006 19:50 GMT
dtFileDate = Int(FileDateTime("C:\USR\MIKE\AT0158.MB"))

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

> What would be the syntx for the variable, dtFileDate to contain only the
> date (not the time) from the FileDateTime function?  For example put
[quoted text clipped - 14 lines]
> mikeburg's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=24581
> View this thread: http://www.excelforum.com/showthread.php?threadid=503681
Gary Keramidas - 21 Jan 2006 20:54 GMT
i've always just used format

Format(FileDateTime("C:\USR\MIKE\AT0158.MB"), "mm/dd/yy")

Signature

Gary

> What would be the syntx for the variable, dtFileDate to contain only the
> date (not the time) from the FileDateTime function?  For example put
[quoted text clipped - 8 lines]
>
> Thanks so very much.  mikeburg
mikeburg - 22 Jan 2006 06:10 GMT
Thanks again, guys.  If it were not for y'all, people like me would
probably give up trying to learn VBA.  mikeburg

Signature

mikeburg

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.