Posts Topics Forums Images
Search videos from message boards Videos Search messages from microblogs Microblogs Search messages from imdb.com Imdb Search messages from yuku.com Yuku Search messages from lefora.com (free forums) Lefora
My account: Login | Sign Up
Loading... 

Thread: Convert military time to standard time

Started 1 year, 10 months ago by Dolfan23
I need to convert a time that is being pulled in through an xml feed and it comes in military format (ie 1930) to a standard time display which in this case would be 7:30 pm. I did a quick search but didn't find anything on doing that so hopefully someone can help with that.
Site: ActionScript.org Forums  ActionScript.org Forums - site profile
Forum: ActionScript 3.0  ActionScript 3.0 - forum profile
Total authors: 2 authors
Total thread posts: 6 posts
Thread activity: no new posts during last week
Domain info for: actionscript.org

Other posts in this thread:

CyanBlue replied 1 year, 10 months ago
Howdy and Welcome... Something like this??? ActionScript Code: var mTime: String = "1930" ; var nTime: String = convertTime ( mTime ) ; trace ( mTime + " = " + nTime ) ; function convertTime ( _t: String ) : String { var _mTime: Number = parseInt ( _t ) ; // trace(_mTime); var AMPM: String = "AM" ; if ( _mTime > 1200 ) {...

Dolfan23 replied 1 year, 10 months ago
Hello and thank you! As usual you are the man, thank you so much Cyan!!

CyanBlue replied 1 year, 10 months ago
Glad to help... Wait... Bummer... I thought that this is AS2 forum and it actually is AS3 forum... I am sure the logic stays the same, but you probably need to mess with the syntax difference if any... If you were dealing with AS2, please let me know and I'll move this thread to AS2 forum...

Dolfan23 replied 1 year, 10 months ago
Quote: Originally Posted by CyanBlue Glad to help... Wait... Bummer... I thought that this is AS2 forum and it actually is AS3 forum... I am sure the logic stays the same, but you probably need to mess with the syntax difference if any... If you were dealing with AS2, please let me know and I'll move this thread to AS2 ...

CyanBlue replied 1 year, 10 months ago
Cool... Looks great...

 

Top contributing authors

Name
Posts
Dolfan23
3
user's latest post:
Convert military time to...
Published (2008-02-07 16:51:00)
Quote: Originally Posted by CyanBlue Glad to help... Wait... Bummer... I thought that this is AS2 forum and it actually is AS3 forum... I am sure the logic stays the same, but you probably need to mess with the syntax difference if any... If you were dealing with AS2, please let me know and I'll move this thread to AS2 forum... I am using AS3 and it worked perfectly. Here is how I used it: ActionScript Code: // Convert time to correct...
CyanBlue
3
user's latest post:
Convert military time to...
Published (2008-02-07 16:56:00)
Cool... Looks great...

Related threads on "ActionScript.org Forums":

Related threads on other sites:

Thread profile page for "Convert military time to standard time" on http://www.actionscript.org. This report page is a snippet summary view from a single thread "Convert military time to standard time", located on the Message Board at http://www.actionscript.org. This thread profile page shows the thread statistics for: Total Authors, Total Thread Posts, and Thread Activity