day of week conversion? (AREV Specific)
At 08 JUN 2000 03:25:32PM Art Clausen wrote:
Does anyone know of a routine to convert an iconv or oconv date to show the day of the week?
There used to be a converstion for it:
OCONV(DATE,"DWA") (alpha) or OCONV(DATE,"DW") (numeric)
Thanks for any help.
At 08 JUN 2000 04:25PM Matt Sorrell wrote:
Art,
You could use something like this:
DaysOfWeek=Mon,Tue,Wed,Thu,Fri,Sat,Sun"
Convert "," to @FM in DaysOfWeek
Today=Date()
TodayMod=Mod(Today,7)
if TodayMod=0 then TodayMod=7
DayName=DaysOfWeek
This works on the principle that if you take the MOD 7 of an internal date, Sun=0, Mon=1 . . . Sat=6
So, you build an array, take the MOD 7, and then use that as your pointer into the array. The only thing you have to watch for is a MOD of 0, which means it is a Sunday.
HTH,
At 08 JUN 2000 04:59PM Don Bakke wrote:
Day=Field("Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday", ",", Mod(Date,7) + 1)
At 08 JUN 2000 06:20PM Matt Sorrell wrote:
Oh sure, just show me up with the simple one-line version.
*grin*
At 08 JUN 2000 06:30PM Art Clausen wrote:
Yeah! That one was cute. Why didn't I think of that?! Only one problem. I don't think it will work for pre-Dick Pick dates. There will have to be a test for the chosen date. Then a different calculation.
At 08 JUN 2000 07:08PM Don Bakke wrote:
Actually, I once posted a similar approach to yours years ago and Steve Smith came along and one-upped me with that line of code. I'm just carrying on in his tradition .
At 09 JUN 2000 04:34AM Steve Smith wrote:
If it was me I must have been channeling Aaron or Cam or someone.
Anyway, if the dates are pre Gregorian (Sep 1652?) then you need to amend accordingly. If AD-BC is of concern then Jesus was probably a Pisces.
Steve
At 09 JUN 2000 06:57PM Art Clausen wrote:
I tried it out. It didn't work correctly! Were there any typos?
At 09 JUN 2000 07:22PM Bill Titus wrote:
Be sure to assign a value to the variable DATE before you run the code.
At 09 JUN 2000 08:42PM [email protected] wrote:
Be sure to assign a value to the variable DATE before you run the code.
For example, like DATE=Date()
[email protected] onmouseover=window.status=imagine … ;return(true)"
Ray Chan ~ Symmetry Info
At 12 JUN 2000 09:37AM Matt Sorrell wrote:
Art,
Also, this code relies on the date being in internal format.
If you have an externally formatted date (06/12/2000, for instance), you need to ICONV the date first.
At 25 OCT 2005 08:59AM Mike Ruane wrote:
Both DW and DWA will be in the OI 7.2 release.
At 25 OCT 2005 09:10AM [email protected]'s Don Bakke wrote:
Talk about ressurecting an old thread! Kudos on the new feature.
At 25 OCT 2005 10:54AM Mike Ruane wrote:
Sometimes it takes alitle longer than usual
![]()
Actually, this is an enhancement made as a result of the new CTO tool that gets greenscreen PICK applications into OI very quickly.
We've also added MC/A,MCA,MCAN,MCU,MCL,MCT,MCN,DW,DWA, and DQ.
We'll officially announce the CTO shortly.
At 27 OCT 2005 07:02AM Hippo wrote:
Did you implement Pre/post Georgian test mentioned by Steve Smith?
At 27 OCT 2005 07:14AM Mike Ruane wrote:
Verily, no.
At 03 NOV 2005 05:33AM [email protected] wrote:
Wouldn't matter if they did, since it depends on when a place switched calendars.
The October Revolution actually took place November 7th. Trouble was, Russia was still using the Julian Calendar at the time, so they thought it was only October 25th.
From Wikepedia:
"Dates of events in Great Britain prior to 1752 are usually now shown in their original Old Style form, whereas dates of events in (then British) America prior to 1752 are usually now shown in the New Style form.
For example, Shakespeare died on 23 April (OS), and it is rare to see this converted to 3 May (NS). But while George Washington was born on 11 February (OS), his birthday is now celebrated on 22 February (NS)."
If Julian/Gregorian accuracy is important, then I'd suggested using the OS/NS style or using a Calendar Converter
Not that were pedantic or anything :)
The Sprezzatura Group Web Site
World Leaders in all things RevSoft
At 03 NOV 2005 10:00AM Mike Ruane wrote:
Someone needs a life…
At 03 NOV 2005 01:45PM R Johler wrote:
You're dating yourself….
At 03 NOV 2005 11:41PM dsig _at_ sigafoos.org wrote:
I can only think this is the master sprezz .. as the other guys have to work
At 04 NOV 2005 02:40AM [email protected] wrote:
No - the master Sprezz would have posted "Not that we're pedantic" not "Not that were pedantic"
:)
The Sprezzatura Group Web Site
World Leaders in all things RevSoft
At 04 NOV 2005 11:56AM dsig _at_ sigafoos.org wrote:
thanks for my morning funny
At 04 NOV 2005 01:42PM [email protected] wrote:
I posted the message. The Sprezzatura Group appologise for any confusion this might have cause.
The Sprezzatura Group Web Site
World Leaders in all things RevSoft