<?xml version="1.0" encoding="iso-8859-1"?><rss version="2.0">
<channel><title><![CDATA[ActionScript.org Flash, Flex and ActionScript Resources - Comments for article: Displaying the Date and Time With Flash MX]]></title><link>http://www.actionscript.org/resources</link><description /><language>en-us</language><copyright><![CDATA[http://www.actionscript.org/resources]]></copyright><generator>N/A</generator><webMaster>general.redirect@gmail.com</webMaster><lastBuildDate>Mon, 23 Nov 2009 05:37:28 CST</lastBuildDate><ttl>20</ttl><item><title><![CDATA[Comment #1]]></title><link>http://www.actionscript.org/resources/articles/47/1/Displaying-the-Date-and-Time-With-Flash-MX/Page1.html#Comment1681</link><description><![CDATA[Is there a way to make the time display in 12 hr format (not millitary time)? Thanks!<br/><br/>
(Comment posted by robert at 4:22 pm, Thu 22nd Mar 2007)]]></description><author>no@spam.com (robert)</author><pubDate><![CDATA[Thu, 22 Mar 2007 16:22:00 CDT]]></pubDate><guid isPermaLink="true">http://www.actionscript.org/resources/articles/47/1/Displaying-the-Date-and-Time-With-Flash-MX/Page1.html#Comment1681</guid></item><item><title><![CDATA[Comment #2]]></title><link>http://www.actionscript.org/resources/articles/47/1/Displaying-the-Date-and-Time-With-Flash-MX/Page1.html#Comment3525</link><description><![CDATA[Excellent work, thank you for taking the time to do this!

I am also wondering the same thing as the person above me, is it possible to have it on a 12h clock instead of a 24?

Thank You!<br/><br/>
(Comment posted by Andrew at 12:27 pm, Mon 28th May 2007)]]></description><author>no@spam.com (Andrew)</author><pubDate><![CDATA[Mon, 28 May 2007 12:27:31 CDT]]></pubDate><guid isPermaLink="true">http://www.actionscript.org/resources/articles/47/1/Displaying-the-Date-and-Time-With-Flash-MX/Page1.html#Comment3525</guid></item><item><title><![CDATA[Comment #3]]></title><link>http://www.actionscript.org/resources/articles/47/1/Displaying-the-Date-and-Time-With-Flash-MX/Page1.html#Comment4632</link><description><![CDATA[thanks so good tutorial!! 
but i don't understand why use"arg" in function part? what's that mean??<br/><br/>
(Comment posted by vicky at 10:09 pm, Fri 13th Jul 2007)]]></description><author>no@spam.com (vicky)</author><pubDate><![CDATA[Fri, 13 Jul 2007 22:09:29 CDT]]></pubDate><guid isPermaLink="true">http://www.actionscript.org/resources/articles/47/1/Displaying-the-Date-and-Time-With-Flash-MX/Page1.html#Comment4632</guid></item><item><title><![CDATA[Comment #4]]></title><link>http://www.actionscript.org/resources/articles/47/1/Displaying-the-Date-and-Time-With-Flash-MX/Page1.html#Comment5753</link><description><![CDATA[Followed all th instructions, and my time is 12 hours infront on the actual time. Any ideas why? and how can I correct this?<br/><br/>
(Comment posted by Jo at 5:07 am, Fri 31st Aug 2007)]]></description><author>no@spam.com (Jo)</author><pubDate><![CDATA[Fri, 31 Aug 2007 05:07:55 CDT]]></pubDate><guid isPermaLink="true">http://www.actionscript.org/resources/articles/47/1/Displaying-the-Date-and-Time-With-Flash-MX/Page1.html#Comment5753</guid></item><item><title><![CDATA[Comment #5]]></title><link>http://www.actionscript.org/resources/articles/47/1/Displaying-the-Date-and-Time-With-Flash-MX/Page1.html#Comment8219</link><description><![CDATA[how would you go about using the date to jump to a paticular frame<br/><br/>
(Comment posted by Dean at 5:11 pm, Thu 13th Dec 2007)]]></description><author>no@spam.com (Dean)</author><pubDate><![CDATA[Thu, 13 Dec 2007 17:11:02 CST]]></pubDate><guid isPermaLink="true">http://www.actionscript.org/resources/articles/47/1/Displaying-the-Date-and-Time-With-Flash-MX/Page1.html#Comment8219</guid></item><item><title><![CDATA[Comment #6]]></title><link>http://www.actionscript.org/resources/articles/47/1/Displaying-the-Date-and-Time-With-Flash-MX/Page1.html#Comment10232</link><description><![CDATA[Great work, Bruno.  I have used your ideas to build a single-parameter function that grabs the system date, formats it in several ways, and return it as string.  (eg: "26/03/2008", "16-Mar-2008", "Saturday, 16 March 2008", etc).<br/><br/>
(Comment posted by M-Auwal Gene III at 1:21 pm, Sun 16th Mar 2008)]]></description><author>no@spam.com (M-Auwal Gene III)</author><pubDate><![CDATA[Sun, 16 Mar 2008 13:21:50 CDT]]></pubDate><guid isPermaLink="true">http://www.actionscript.org/resources/articles/47/1/Displaying-the-Date-and-Time-With-Flash-MX/Page1.html#Comment10232</guid></item><item><title><![CDATA[Comment #7]]></title><link>http://www.actionscript.org/resources/articles/47/1/Displaying-the-Date-and-Time-With-Flash-MX/Page1.html#Comment11942</link><description><![CDATA[for 12 hours clock just use something like this

DateX = new Date();
MyHour = DateX.getHours();
if(MyHour > 12)
{
MyHour -= 12;
}


TADAA, loop it and u got a 12 hours clock =D easy<br/><br/>
(Comment posted by Robert at 12:10 am, Thu 11th Sep 2008)]]></description><author>no@spam.com (Robert)</author><pubDate><![CDATA[Thu, 11 Sep 2008 00:10:34 CDT]]></pubDate><guid isPermaLink="true">http://www.actionscript.org/resources/articles/47/1/Displaying-the-Date-and-Time-With-Flash-MX/Page1.html#Comment11942</guid></item><item><title><![CDATA[Comment #8]]></title><link>http://www.actionscript.org/resources/articles/47/1/Displaying-the-Date-and-Time-With-Flash-MX/Page1.html#Comment12350</link><description><![CDATA[Or even better
MyHour = MyHour % 12;<br/><br/>
(Comment posted by Mr_Chaos at 2:34 pm, Wed 3rd Dec 2008)]]></description><author>no@spam.com (Mr_Chaos)</author><pubDate><![CDATA[Wed, 03 Dec 2008 14:34:31 CST]]></pubDate><guid isPermaLink="true">http://www.actionscript.org/resources/articles/47/1/Displaying-the-Date-and-Time-With-Flash-MX/Page1.html#Comment12350</guid></item><item><title><![CDATA[Comment #9]]></title><link>http://www.actionscript.org/resources/articles/47/1/Displaying-the-Date-and-Time-With-Flash-MX/Page1.html#Comment12482</link><description><![CDATA[This is great bit of code, but does anyone know how I could add a "Morning", "Afternoon" and "Evening" field that changed when the time got to those times? 

Any help would be much appreciated!

Adam<br/><br/>
(Comment posted by Adam at 6:50 pm, Tue 6th Jan 2009)]]></description><author>no@spam.com (Adam)</author><pubDate><![CDATA[Tue, 06 Jan 2009 18:50:11 CST]]></pubDate><guid isPermaLink="true">http://www.actionscript.org/resources/articles/47/1/Displaying-the-Date-and-Time-With-Flash-MX/Page1.html#Comment12482</guid></item><item><title><![CDATA[Comment #10]]></title><link>http://www.actionscript.org/resources/articles/47/1/Displaying-the-Date-and-Time-With-Flash-MX/Page1.html#Comment12497</link><description><![CDATA[Excellent. Thank you.<br/><br/>
(Comment posted by Leonardo at 1:10 pm, Sat 10th Jan 2009)]]></description><author>no@spam.com (Leonardo)</author><pubDate><![CDATA[Sat, 10 Jan 2009 13:10:36 CST]]></pubDate><guid isPermaLink="true">http://www.actionscript.org/resources/articles/47/1/Displaying-the-Date-and-Time-With-Flash-MX/Page1.html#Comment12497</guid></item><item><title><![CDATA[Comment #11]]></title><link>http://www.actionscript.org/resources/articles/47/1/Displaying-the-Date-and-Time-With-Flash-MX/Page1.html#Comment12659</link><description><![CDATA[When we want the time to work at an anle it does not show.... with the code above Please explain<br/><br/>
(Comment posted by Bini at 4:57 am, Wed 18th Feb 2009)]]></description><author>no@spam.com (Bini)</author><pubDate><![CDATA[Wed, 18 Feb 2009 04:57:23 CST]]></pubDate><guid isPermaLink="true">http://www.actionscript.org/resources/articles/47/1/Displaying-the-Date-and-Time-With-Flash-MX/Page1.html#Comment12659</guid></item><item><title><![CDATA[Comment #12]]></title><link>http://www.actionscript.org/resources/articles/47/1/Displaying-the-Date-and-Time-With-Flash-MX/Page1.html#Comment13407</link><description><![CDATA[As I found in another article, if you want the months as numbers, you have to add 1 to the month.

So, if you write this:
mm = myDate.getMonth();
then the month as a number would be:
(mm + 1)

Also, if you want a 12-hour clock, you will have to remember about midnight being hour 12 instead of 0.

Try this:
hr = myDate.getHours();
ampm = "am";
if (hr>=12) ampm="pm";
hr %= 12;
if (hr==0) hr = 12;
hr = howlong (String(hr));
If I haven't made any mistakes, that should do it.<br/><br/>
(Comment posted by another Robert at 4:44 am, Tue 1st Sep 2009)]]></description><author>no@spam.com (another Robert)</author><pubDate><![CDATA[Tue, 01 Sep 2009 04:44:58 CDT]]></pubDate><guid isPermaLink="true">http://www.actionscript.org/resources/articles/47/1/Displaying-the-Date-and-Time-With-Flash-MX/Page1.html#Comment13407</guid></item><item><title><![CDATA[Comment #13]]></title><link>http://www.actionscript.org/resources/articles/47/1/Displaying-the-Date-and-Time-With-Flash-MX/Page1.html#Comment13409</link><description><![CDATA[To Adam: If you want "Morning", "Afternoon", and "Evening", then use an "if" statement based on the hours:<br/><br/>
(Comment posted by the other Robert at 4:46 am, Tue 1st Sep 2009)]]></description><author>no@spam.com (the other Robert)</author><pubDate><![CDATA[Tue, 01 Sep 2009 04:46:45 CDT]]></pubDate><guid isPermaLink="true">http://www.actionscript.org/resources/articles/47/1/Displaying-the-Date-and-Time-With-Flash-MX/Page1.html#Comment13409</guid></item><item><title><![CDATA[Comment #14]]></title><link>http://www.actionscript.org/resources/articles/47/1/Displaying-the-Date-and-Time-With-Flash-MX/Page1.html#Comment13536</link><description><![CDATA[ok, question, how would you integrate what you said into the current script? while preserving everything else?<br/><br/>
(Comment posted by Chris at 6:54 pm, Mon 5th Oct 2009)]]></description><author>no@spam.com (Chris)</author><pubDate><![CDATA[Mon, 05 Oct 2009 18:54:04 CDT]]></pubDate><guid isPermaLink="true">http://www.actionscript.org/resources/articles/47/1/Displaying-the-Date-and-Time-With-Flash-MX/Page1.html#Comment13536</guid></item></channel></rss>