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 JavaScript programming only
Search
Advanced Search
Forum
Groups
Today’s Posts
Calendar
Forum
Client side development
JavaScript programming
Announcement
Collapse
No announcement yet.
day from given date
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
heaps21
New to the CF scene
Join Date:
Feb 2004
Posts:
146
Share
Tweet
#1
day from given date
Feb 23, 2004, 09:03 AM
I have a date in the form yyyy-mm-dd but need somehow, to return the day of the week from it. Is there any predefined syntax for this? if not, what is the best way to go about it.
Cheers.
A1ien51
New to the CF scene
Join Date:
Jun 2002
Posts:
2733
Share
Tweet
#2
Feb 23, 2004, 09:54 AM
You can use JavaScripts Date Function to figure it out
var theDate = newDate(date_variable);
theDay = d.getDay();
now the format of the date_variable is m/d/y
Eric
Tech Author [Ajax In Action, JavaScript
: Visual Blueprint]
Comment
Post
Cancel
heaps21
New to the CF scene
Join Date:
Feb 2004
Posts:
146
Share
Tweet
#3
Feb 23, 2004, 10:32 AM
thats handy, cheers... I have tried it and it just doesnt get the date right though!!
I have
var y=2004
var m=3
var d=31
then
var c = new Date(m,d,y)
and no matter what combination i use e.g. y,m,d or m,d,y or m/d/y etc etc i just get completely random dates.
Any idea how I can fix this?
Thanks.
Comment
Post
Cancel
heaps21
New to the CF scene
Join Date:
Feb 2004
Posts:
146
Share
Tweet
#4
Feb 23, 2004, 10:51 AM
its ok, it works now - sorry! I didnt know that months were zero based!
Comment
Post
Cancel
Previous
template
Next
Working...
Yes
No
OK
OK
Cancel
X
Comment