Login or Sign Up
Logging in...
Remember me
Log in
Forgot password or user name?
or
Sign Up
Log in with
Search in titles only
Search in EFS Studies only
Search
Advanced Search
Forums
Articles
Groups
Member List
Forum
EFS Development
EFS Studies
Announcement
Collapse
No announcement yet.
2 digit time
Collapse
X
Collapse
Posts
Latest Activity
Photos
Search
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
sunman4008
Registered User
Join Date:
Jan 2012
Posts:
117
Share
Tweet
#1
2 digit time
03-13-2014, 12:06 PM
I am using sDate += ":" + (today.getMinutes());
how do I get 2minutes to look like 02 in string?
waynecd
Registered User
Join Date:
Dec 2002
Posts:
1046
Share
Tweet
#2
03-13-2014, 06:54 PM
use a variable to record the minutes, add the 0 as necessary to the variable, and use the variable in place of "today.getMinutes()"
Like:
PHP Code:
var
nMin
=
today
.
getMinutes
();
if(
nMin
<
10
)
nMin
=
"0"
+
nMin
;
sDate
+=
":"
+
nMin
;
Comment
Post
Cancel
Previous
template
Next
Working...
Yes
No
OK
OK
Cancel
X
Comment