A peculiar request this one.
I am looking to compare two times in C#.
I have:
DateTime systemDate = DateTime.Now.AddMinutes(-15);
//which I presume subtracts 15 minutes from the current time
I am then reading in an ftp file from a Fedora server containing a date and time that I am reading in as a stream and converting to a DateTime
2011-03-17 09:00:18.000000000 +0000
I then parse this:
compareDate = DateTime.Parse(streamer);
My Question therefore is how do I format systemDate to be in the same format as the one I have parsed in compareDate? I am aware you can format DateTime but all of the sites I have seen so far dont have it in this format.
Thank you in advance, feel free to comment if you think I have missed anything 🙂
No need to format
systemDate, because you already parsed the date from the FTP server into aDateTime. You can just comparesystemDatewithcompareDate.