Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.acorn.programmer > #5796
| From | Andrew Conroy <a.m.conroy@owlart.co.uk> |
|---|---|
| Subject | Re: Dates as numbers in BASIC |
| Newsgroups | comp.sys.acorn.programmer |
| Date | 2019-06-26 23:05 +0100 |
| Message-ID | <57ca61b0cda.m.conroy@owlart.co.uk> (permalink) |
| References | <bbb9c2c957.Kevin@talktalk.net> <0cb5c9c957.harriet@blueyonder.co.uk> <57ca5d74e5a.m.conroy@owlart.co.uk> |
| Organization | Owl-Art Un-Ltd. |
In article <57ca5d74e5a.m.conroy@owlart.co.uk>,
Andrew Conroy <a.m.conroy@owlart.co.uk> wrote:
> In article <0cb5c9c957.harriet@blueyonder.co.uk>,
> Harriet Bazley <harriet@bazleyfamily.co.uk> wrote:
> > On 25 Jun 2019 as I do recall,
> > Kevin Wells wrote:
> > > Hi
> > >
> > > How can you get the month as a number instead of the 3 letter
> > > shorterned name e.g?
> > >
> > > 06 instread of Jun
> > Use OS_Word 14 to read the computer's clock as a 5-byte time value,
> > then pass the resulting area of memory to OS_ConvertDateAndTime.
> > The format string for a three-letter shortened month name is %M3 and
> > for the month in numbers is %MN - see manuals.
> Or OS_ConvertDateAndTime or, better still,
> Territory_ConvertTimeToOrdinals to convert any 5 byte time block rather
> than just the current time. You'll then have to parse the result to get
> just the month.
There's also Territory_TimeStringToOrdinals which might be easier. Feed
in a dummy time string with the desired month in it, and back comes the
month number at offset &14 in the buffer.
Andrew
--
+----------------------------------------+---------------------------------+
| Andrew Conroy, Owl-Art Un-Ltd. | email: a.m.conroy@argonet.co.uk |
| Coming to you on an Acorn RiscPC SA110 | |
+----------------------------------------+---------------------------------+
The impossible I can do at once, miracles take a little longer!!
Back to comp.sys.acorn.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Dates as numbers in BASIC Kevin Wells <kev@kevsoft.co.uk> - 2019-06-25 18:09 +0100
Re: Dates as numbers in BASIC "John Williams (News)" <UCEbin@tiscali.co.uk> - 2019-06-25 18:45 +0100
Re: Dates as numbers in BASIC Paul Oates <oatespaul@btinternet.com> - 2019-06-25 19:00 +0100
Re: Dates as numbers in BASIC news@sprow.co.uk - 2019-06-27 05:47 -0700
Re: Dates as numbers in BASIC Kevin Wells <kev@kevsoft.co.uk> - 2019-06-29 12:23 +0100
Re: Dates as numbers in BASIC jgh@mdfs.net - 2019-07-03 11:47 -0700
Re: Dates as numbers in BASIC Harriet Bazley <harriet@bazleyfamily.co.uk> - 2019-06-25 19:25 +0100
Re: Dates as numbers in BASIC Andrew Conroy <a.m.conroy@owlart.co.uk> - 2019-06-26 22:19 +0100
Re: Dates as numbers in BASIC Andrew Conroy <a.m.conroy@owlart.co.uk> - 2019-06-26 23:05 +0100
Re: Dates as numbers in BASIC Alan Adams <alan@adamshome.org.uk> - 2019-06-27 12:08 +0100
Re: Dates as numbers in BASIC Alan Adams <alan@adamshome.org.uk> - 2019-06-27 13:32 +0100
csiph-web