Application Suite: Alarm


Time and date display formats

This describes the parameters used to create a date and time format string in the Choices window.

Variable  Meaning   Example

  • %se seconds 59
  • %mi minutes 05
  • %12 hours in 12 hour format 07
  • %24 hours in 24 hour format 23
  • %am or %pm 'AM' or 'PM' pm
  • %we weekday, in full Thursday
  • %w3 weekday, in three characters Thu
  • %wn weekday, as a number 5
  • %dy day of the month 01
  • %st 'st', 'nd', 'rd' or 'th' st
  • %mo month name in full September
  • %m3 month name as three characters Sep
  • %mn month as a number 09
  • %ce century 19
  • %yr year within century 87
  • %wk week of the year, Mon to Sun 52
  • %dn day of the year 364
  • %tz Timezone BST
  • %% insert a %

Numbers appear as fixed-width with leading zeros, so, for example, %mi would give a result such as 06. To remove leading zeros, prefix the code with a z, so, for example, %zmi would give a result such as 6.

Plain text can also be included in the variable string, for example:

%we the %dy%st %m3 %yr

would display in the form:

Wednesday the 21st Jan 95


This documentation is copyright 3QD Developments Ltd 2013 and may not be reproduced or published in any form without the copyright holder's permission. RISC OS is subject to continuous development and improvement as such all information is provided by 3QD Developments Ltd in good faith and is believed to be correct at the time of publication E&OE. 3QD Developments Ltd cannot accept any liability for any loss or damage arising from the use of any information provided as part of the RISC OS Documentation.

HTML document version r23142 (3rd November 2015)