?
Solved

VBA Time Hour Mins Seconds

Posted on 2007-03-29
5
Medium Priority
?
290 Views
Last Modified: 2013-11-27
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
Comment
Question by:jcuzzola
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 67

Expert Comment

by:sirbounty
ID: 18816236
Change to Format(Now(), "mm-dd-yyyy-hhmmss")
to get seconds
0
 
LVL 67

Accepted Solution

by:
sirbounty earned 500 total points
ID: 18816245
 sOutput = CurrentProject.Path & "qryReactorBatch_" & Format(Now(), "mm-dd-yyyy-hhmmssms") & ".xls"
will give you milliseconds
0
 

Author Comment

by:jcuzzola
ID: 18816958
Thanks sir bounty... Working well....
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 18816980
:)
0
 
LVL 51

Expert Comment

by:Gustav Brock
ID: 22970017
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

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question