O$: Date parts

Kelly Burgess kellyb at montana.com
Mon Mar 13 04:55:14 EDT 2017


Hi Franco,

>if I use the dpart func in a calculation I'm fired again..

You could create an oDate object class and give it a $dayNumber(pDate) method with:

   Calculate omnisNum as dpart(kDayofWeek,pDate)
   Calculate postgresNum as pick(omnisNum<1,omnisNum-1,6)
   Quit method postgresNum

Then you can use dateobj.$dayNumber(date) in your calculations, rather than using dpart(kDayOfWeek,date) directly.

Kelly




More information about the omnisdev-en mailing list