Skip to main content

Hi

 

Am I doing something wrong here.

 

Add two controls to a view, a calendar and a data label

On the data label set an expression to get the Week No when the calendar control is changed

 

Works OK but the correct week number is only shown from a tuesday onwards.

 

eg. This week (June 25) i count as week 26

when i select the calendar control for monday it shows week 25, if i select tuesday is shows week 26

 

Is this a bug?

If you select Wednesday, does it show week 25 of week 26?


I would imagine that it might have something to do with the first day of week setting in the Picker Type of the Calendar control.


This might have something to do with the Calendar control using Zulu time as its primary data.  It sounds a little strange, however I've seen something similar with users in other time zones submitting requests and the calendar control being a day off.

 

Apply this Expression to your existing data label (Trip Start Data Cal, will be your calendar) to see if it corrects what you’re seeing:

 

 

16675i6F0743E248D84C50.png

 

 

 

 

 

 


@Austin - if I select Wednesday it shows week 26 (correct) 

 

@ JakeCooley - I dont see these options in calendar control to set first day of week.  I guess they have been introduced in previous versions. I know we are are few releases behind (currently 1.0.3)


Hi All,


 


This is a know issue that will be reviewed for a future release.


TFS 466898: K2SF. Issue with week Number operator. Incorrect week number displayed.


Issue:


When making use of the Week Number Expression the dates are added up starting at the 1 Jan counting 7 days, this would then count as one week.


But instead this should be counted from Monday to Sunday as one week.


 


Workaround:


Create a Text box containing expression 1 which will display the current date (Current Date)
Create a Text box containing expression 2 which will display current date and time (Current Date and Time)
Create a Text box containing expression 3 which will display this week’s number (Week Number (Current Date))
Create a Text box containing expression 4 which will display last week’s number (Week Number (Current Date)-1)

Workaround is to replace the current (Above) expressions with the following expressions:
Replace Expression 3 with – Week Number (Expression 5) +1
Replace Expression 4 with – Week Number (Expression 6) -1
Create Expression 5 – Week Start (Current Date & Time)
Create Expression 6 – Week End (Current Date & Time)


 


Kind Regards,


Raymond


Reply