weekday
David Bateman
dbateman at dbateman.org
Wed Jun 3 14:58:48 CDT 2009
claudio cortes wrote:
> Greetings:
>
> How to obtain the weekday (1-7) having the year,month and day of a certain date.
> I probed with strftime but doesn't work
> Thank's !
>
>
>
The "weekday" function does this and is in 3.0.x and later.. For example
[n,s] = weekday("3-Jun-2009")
returns 4 and Weds, which with Sunday=1 makes sense. The weekday
function can take the date in any formqt supported by datevec called
with a single qrgument. For example
[n,s] = weekday("06/03/09")
is the same as above
D.
--
David Bateman dbateman at dbateman.org
35 rue Gambetta +33 1 46 04 02 18 (Home)
92100 Boulogne-Billancourt FRANCE +33 6 72 01 06 33 (Mob)
More information about the Help-octave
mailing list