Solved

VBA Time Hour Mins Seconds

Posted on 2007-03-29
5
269 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
  • 3
5 Comments
 
LVL 67

Expert Comment

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

Accepted Solution

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

Author Comment

by:jcuzzola
Comment Utility
Thanks sir bounty... Working well....
0
 
LVL 67

Expert Comment

by:sirbounty
Comment Utility
:)
0
 
LVL 49

Expert Comment

by:Gustav Brock
Comment Utility
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
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 …
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now