IPCC Enterprise 7.1 -> Weekday() built-in function

Answered Question
Aug 13th, 2008
User Badges:

Has anyone used this built-in function in ICM Scripting before; Weekday()? I am trying to use it in a script to read off a day of week based on a historical date, but I can't figure out how to determine input into the function. For example it won't accept Weekday(2008,08,13) like a Date() function will. I can get it to work with the results returned by ICM from Date(); result for today would be 148878. So, when I test Weekday(148878) it does work and proplerly returns 4 as today is Wednesday. Now my only problem is how can I convert a past date into the accepted format. For example I want to figure out what day of week 01/01/08 was. How do I translate 01/01/08 into a 148XXX value?

Correct Answer by david.macias about 8 years 11 months ago

Might this work?


WeekDay(Date()-Date(01/01/08))


david

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
Correct Answer
david.macias Wed, 08/13/2008 - 08:32
User Badges:
  • Blue, 1500 points or more

Might this work?


WeekDay(Date()-Date(01/01/08))


david

gtechfred01 Wed, 08/13/2008 - 08:56
User Badges:

Thanks David, you got me going the right direction, here is what worked:


weekday(date(01/01/08))


Thanks for the help!

Fred


Actions

This Discussion