In case anyone has replied to this and I haven't yet gotten it, I figured
out what the issue was. The dayOfWeek() function needed a date and not an
integer. I removed the day() function wrapping the dateFormat() function and
all works as intended now.

 

Hopefully that's helpful to someone else.

 

Thank you,

 

Troy Jones

Technical Manager

Third Wave Digital

1841 Hardeman Ave.

Macon, GA 31201

 <mailto:t...@thirdwavedigital.com> t...@thirdwavedigital.com

 <http://www.thirdwavedigital.com> www.thirdwavedigital.com

 

From: ad...@acfug.org [mailto:ad...@acfug.org] On Behalf Of Troy Jones
Sent: Wednesday, January 09, 2013 4:25 PM
To: discussion@acfug.org
Subject: [ACFUG Discuss] Anomalies with dayOfWeekAsString

 

I'm struggling with something here and can't figure out of I'm doing
something wrong or if I've encountered a nasty bug. I am trying to extract
the day of week (both numeric and string) with the following lines:

 

<cfscript>

writeOutput(now() & "<br />");

                writeOutput(dateFormat(now(),'mm/dd/yyyy') & '<br />');

writeOutput(dayOfWeek(day(dateFormat(now(),'mm/dd/yyyy'))) & '<br />');

 
writeOutput(dayOfWeekAsString(dayOfWeek(day(dateFormat(now(),'mm/dd/yyyy')))
));

</cfscript>

 

Here is my output:

 

{ts '2013-01-09 16:21:22'}

01/09/2013

2

Monday

 

It Seems that we're ok until the third line, where it return the numeric day
of week (today, 01/09/2013) as 2 and string value of Monday when the
expected return is 4 and Wednesday. 

 

I admit it's entirely possible I'm missing a minor detail or something
(wouldn't be the first time), but I can't figure out what's going on here.

 

Anyone have ideas?

 

Thank you,

 

Troy Jones

Technical Manager

Third Wave Digital

1841 Hardeman Ave.

Macon, GA 31201

t...@thirdwavedigital.com

www.thirdwavedigital.com

 


------------------------------------------------------------- 
To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform 

For more info, see http://www.acfug.org/mailinglists 
Archive @ http://www.mail-archive.com/discussion%40acfug.org/ 
List hosted by FusionLink <http://www.fusionlink.com>  
------------------------------------------------------------- 




-------------------------------------------------------------
To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------

Reply via email to