• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 297
  • Last Modified:

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"
0
jcuzzola
Asked:
jcuzzola
  • 3
1 Solution
 
sirbountyCommented:
Change to Format(Now(), "mm-dd-yyyy-hhmmss")
to get seconds
0
 
sirbountyCommented:
 sOutput = CurrentProject.Path & "qryReactorBatch_" & Format(Now(), "mm-dd-yyyy-hhmmssms") & ".xls"
will give you milliseconds
0
 
jcuzzolaAuthor Commented:
Thanks sir bounty... Working well....
0
 
sirbountyCommented:
:)
0
 
Gustav BrockCIOCommented:
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:

http://www.experts-exchange.com/Microsoft/Development/MS_Access/Access_Coding-Macros/Q_23725904.html

/gustav
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now