Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: 12-hour format

From: greggirwin:starband at: 5-Oct-2001 1:53

Hi Mike, << How can I transform a 24-hour to 12-hour form e.g.,13:10 to 1:10? >> This came up some time ago. Here's what Allen Kamp posted, with original credit given to Carl: nice-time: func [time /local am][ time/3: 0 am: pick [" AM" " PM"] time < 12:00 if time >= 12:00 [time: time - 12:00] if time/1 = 0 [time/1: 12] rejoin [time am] ] I think some others may have improved upon it as well. --Gregg