I am racking my brains trying to figure out to automatically set a date on a calendar component to the first day of the current week. This is my chart, it displays weekly historical CIP data in a chart starting on a Sunday of the selected week from the calendar component. Issue I have, each time the clients shut down, the calendar start date reverts back to the date when the project was last saved.
I am using a client startup script to capture the time & date the project was launched and then want to set the calendar to the 1st day of the week of the current week. Just cant figure a ‘smart’ way to calculate what that date should be.
So far I am thinking of a look up table for the next few years, that has the day # of the first Sunday of the selected year and use math voodoo to figure out when the closest Sunday is.
I have to do this using V7.7.8
[attachment=0]2016-11-28 17_46_43-Eview - Ignition Designer.png[/attachment]