Skip to main content
Answer

Substitution Variable - what dictates the start of a week?

  • November 25, 2022
  • 7 replies
  • 203 views

Forum|alt.badge.img+9

Hi all,

 

Some say the first day of the week is Sunday (Mainly in US & Canada), other say the first day of the week is Monday
 

So how is it defined in IFS, what the #First Day of Next Week# is?

Best answer by anmise

Thanks Anmise,

 

Is it possible to update this? Per ISO8601, first day is the week is Monday.

 

Arend

Where are you using it? In the client I believe it’s converted to match your browser locale e.g. if I’m searching with my browser set to Denmark, and I use #NEXT_WEEK# I will get 

(Created ge 2022-11-28T00:00:00Z and Created le 2022-12-04T23:59:59Z)

If I change it to US, then I get

(Created ge 2022-11-27T00:00:00Z and Created le 2022-12-03T23:59:59Z)

7 replies

  • Superhero (Employee)
  • November 25, 2022

In the database it’s calculated this way TRUNC(SYSDATE)-TO_NUMBER(TO_CHAR(SYSDATE, 'D'))+1+7, which gives Sunday. 


Forum|alt.badge.img+9
  • Author
  • Sidekick (Customer)
  • November 25, 2022

Thanks Anmise,

 

Is it possible to update this? Per ISO8601, first day is the week is Monday.

 

Arend


  • Superhero (Employee)
  • Answer
  • November 25, 2022

Thanks Anmise,

 

Is it possible to update this? Per ISO8601, first day is the week is Monday.

 

Arend

Where are you using it? In the client I believe it’s converted to match your browser locale e.g. if I’m searching with my browser set to Denmark, and I use #NEXT_WEEK# I will get 

(Created ge 2022-11-28T00:00:00Z and Created le 2022-12-04T23:59:59Z)

If I change it to US, then I get

(Created ge 2022-11-27T00:00:00Z and Created le 2022-12-03T23:59:59Z)


Forum|alt.badge.img+11
  • Hero (Partner)
  • November 25, 2022

Thanks Anmise,

 

Is it possible to update this? Per ISO8601, first day is the week is Monday.

 

Arend

Where are you using it? In the client I believe it’s converted to match your browser locale e.g. if I’m searching with my browser set to Denmark, and I use #NEXT_WEEK# I will get 

(Created ge 2022-11-28T00:00:00Z and Created le 2022-12-04T23:59:59Z)

If I change it to US, then I get

(Created ge 2022-11-27T00:00:00Z and Created le 2022-12-03T23:59:59Z)

 

Didn't know so just tested by practical example 😉. You are correct! Also makes sense as they are Context variables so they take into account the….. context. 

 

 

 


  • Superhero (Employee)
  • November 25, 2022

Excellent news! So you are happy?


Forum|alt.badge.img+9
  • Author
  • Sidekick (Customer)
  • November 25, 2022

Thanks Anmise,

 

We are using this in the Scheduled Database task to run the Supplier Payment Proposals. Will play a bit further to see behaviour accordingly in regards to manual generating a Proposal, or a scheduled proposal.


Forum|alt.badge.img+3
  • Do Gooder (Customer)
  • March 21, 2025

We are also using this in the Scheduled Database task to run the Supplier Payment Proposals. Anyone found a solution for this?