However, the program is displaying this as 2/5/2007. I'm not doing any sort of manipulation with the date.
You aren't doing any manipulation, but the framework may do. Have you checked the full DateTime object and not only the date part of it?
In this line you cast an object to a DateTime. Assuming that your onject is a string, DateTime.Parse will be invoked to do the conversion. If you do not pass any additional parameters, the local CultureInfo and time zone setting will influence the result.
E.g. for me (in Germany) the result of System.DateTime.Parse( "2007-02-06T00:00:00-05:00" ) is 2007-02-06T06:00.
I recommend that you directly call DateTime.Parse and pass the appropriate CultureInfo to the method. Eventually you should use the CultureInfo in your output methods, too.
Thanks for the suggestions, Tim. I discovered the "problem" not long after posting my first message. I was unaware that the web service was adding a time zone offset. I've since reconfigured the web service to return DataSets without the time zone offset.
I have two Datagrids, one above the other with the same width and X starting point. Is there a way that when the horizontal scrollbar of one is moved right-left, the scrollbar of the other moves to the same position as well?
"Nothing fancy needed, please just solve all our problems as quickly as possible."
I'm trying to decrypt some encrypted text that has been Base64 encoded. The following code throws a System.Security.Cryptography.CryptographicException with the message "Length of the data to decrypt is invalid." I'd appreciate it if someone could demontrate the correct way of doing this and/or point out the flaws in my code.
System::String^ Quantum::Util::DecryptString(System::String^ str)
using namespace System::IO;
using namespace System::Security::Cryptography;