/    Sign up×
Community /Pin to ProfileBookmark

Returning 1/10th second values

Hi,

I’m new to javascript etc, etc…. and am trying to return a string to an XSL sheet containing a ‘TimeStamp’ using the following code:

now = new Date();
hours = now.getHours();
mins = now.getMinutes();
secs = now.getSeconds();

Please could anyone let me know if there is a similar statement which is used to return tenths of a second?

Thanks in advance,

Neal

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@phpnoviceMar 08.2006 — mills = Math.floor(now.[URL=http://msdn.microsoft.com/library/en-us/script56/html/1b512146-1e8a-44a4-89da-6cc5338d15cb.asp]getMilliseconds()[/URL] / 100);

There are 1000 milliseconds per second.
Copy linkTweet thisAlerts:
@DerbyNealauthorMar 09.2006 — Perfect!

Many Thanks.
Copy linkTweet thisAlerts:
@phpnoviceMar 09.2006 — You're welcome.

Cheers.
×

Success!

Help @DerbyNeal spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...