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

  • Thread starter Thread starter mikeburg
  • Start date Start date
M

mikeburg

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
 
dtFileDate = Int(FileDateTime("C:\USR\MIKE\AT0158.MB"))

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)
 
i've always just used format

Format(FileDateTime("C:\USR\MIKE\AT0158.MB"), "mm/dd/yy")
 
Thanks again, guys. If it were not for y'all, people like me would
probably give up trying to learn VBA. mikeburg
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top