Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

At 29 NOV 2004 04:44:00PM David Nowak wrote:

Does OpenInsight 7.01 have any function whereby the day of week can be determined from the date? For example, determine that 12/25/2004 is a Saturday. Furthermore, what is the extent of OpenInsight's date handling capabilities outside of simply formatting the date?

Thanks in advance for any help you can provide.

David Nowak.


At 29 NOV 2004 05:16PM support@sprezzatura.com wrote:

Dates are stored as the number of days elapsed since Day 0 - 31st Dec 1967. Thus all date arithmetic is simply a case of manipulating the base date. Day of the week can be found by using a simple mod function

DayOfWeek=Field("Sun,Mon,Tue,Wed,Thu,Fri,Sat", ",",Mod(BaseDate, 7) + 1)

The date in 3 weeks can be determined by adding 21 to the base date, etc.

support@sprezzatura.com

The Sprezzatura Group Web Site

World Leaders in all things RevSoft


At 29 NOV 2004 10:30PM David Nowak wrote:

Thank you for the info. But doesn't this assume that everything is based upon today's date, 3 weeks from today, for example? What if today, I need to determine the day of week for 12/15/2004?


At 30 NOV 2004 01:19AM Donald Bakke wrote:

David,

The logic Sprezz gave you does not assume any given day. Thus, to use it in the example you just gave:

BaseDate=12/15/2004" ; * External format of the date

BaseDate=Iconv(BaseDate, "D4/") ; Convert to internal format

DayOfWeek=Field("Sun,Mon,Tue,Wed,Thu,Fri,Sat", ",",Mod(BaseDate, 7) + 1) ; * Return the day of the week

dbakke@srpcs.com

SRP Computer Solutions, Inc.


At 30 NOV 2004 02:10AM dsig_at_sigafoos.org wrote:

did you try the routine sprezz gave you?

dsig_at_sigafoos.org

DSigs Radio Free Oregon

Phone: 971-570-2005


At 30 NOV 2004 07:47AM David Nowak wrote:

Thanks again to everyone. All of this is working just fine. I really appreciate the help.

David Nowak.

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/570e4d0180796a6685256f5b007762e1.txt
  • Last modified: 2023/12/30 11:57
  • by 127.0.0.1