How to change or update the system date using vb?
Posted on 2012-04-11
The target device is a Symbol 9090 scanner running Windows CE. My app is written in vb.net 2008. We get the date currently in the scanner and show it in a text box using things like 'datetime.today.month' and 'datetime.today.day' etc. Then, if it is wrong, we need to allow the user to key in the correct date, and then make it where our program can take the new date and update the scanner's system date.
How can I do this in my program--preferably in a simple way? In searching the internet, some say you can simply set 'microsoft.visualbasic.datestring' to a string that contains the new date (which would be nice and easy), while others say the only way is to use dozens of lines of rather complex code.
I do know that I can get out of our app on the scanner, go to start> run> cmd in Windows CE, and simply type 'date 04-11-2012' to set the date--just we can do in any Windows environment. Is there a way that is this simple from within my vb app?
I'm hoping someone can clarify for me to easiest, most direct way to do the job. TIA