开发者

Timing Format in Flex "24-hour clock" and "12-hour clock"

Kindly guide me.

Timing Format in Flex "24-hour clock"开发者_如何学编程 and "12-hour clock"

if "24-hour clock" Button is selected, the control should convert times to 24 hour clock time. For example, if 3:45 p.m. is entered, it should be converted to 15:45.

if "12-hour clock" Button is selected, the control should convert times to 12 hour clock time. For example, if 15:45 p.m. is entered, it should be converted to 3:45.

Thanks in Advance

Amit pathak


http://www.popamihai.com/2009/07/flex/example-of-using-the-dateformatter-class-in-flex/

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/formatters/DateFormatter.html?filter_flex=4.1&filter_flashplayer=10.1&filter_air=2


list($hh,$mm,$ss) = explode(":",$time);
if($hh>12)
{
  $hh = $hh-12;
  $ampm = 'pm';
}
else
{
  $ampm = 'am';
}
$newcall_time = $hh.":".$mm.$ampm;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜