I have a picker on my Main form. I need to go to another form and when I go back to Main I want the picker to show the same value as before. In order to do that, I wanted to save the value of the picker into an static Date variable, but when I run the code I get a "Integer cannot be cast to Date" exception. I am attaching a picture of a try I did assigning the value to an auxiliar Date variable. I get the same error:
