Link to home
Start Free TrialLog in
Avatar of jcuzzola
jcuzzola

asked on

VBA Time Hour Mins Seconds

The output below spceifies Month-day-year and -time hours- Mins. can I include seconds or tenths of seconds?

  sOutput = CurrentProject.Path & "qryReactorBatch_" & Format(Now(), "mm-dd-yyyy-hhmm") & ".xls"
Avatar of sirbounty
sirbounty
Flag of United States of America image

Change to Format(Now(), "mm-dd-yyyy-hhmmss")
to get seconds
ASKER CERTIFIED SOLUTION
Avatar of sirbounty
sirbounty
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jcuzzola
jcuzzola

ASKER

Thanks sir bounty... Working well....
For the records: This doesn't work as advertised, as VBA doesn't know of milliseconds natively.

However, it can be done. Follow the link here:

https://www.experts-exchange.com/questions/23725904/Access-to-the-millisecond-article-Examples.html

/gustav