If you parse a string that only contains a time into a DateTime, the result is that time on the current day. Eg '11:14' parsed on Jan 6 2011 => 20119601T1114.
If you parse a string that only contains a date into a DateTime, the result is midnight (0000) on that day. Eg '01/01/2011' => 20110101T0000. You also get this if you take the Date property of any DateTime.
The difference between two DateTimes (including one returned from .Date) obtained with '-' is a TimeSpan. Similarly, if you want to add to a datetime with '+', the addend must be a TimeSpan.
C# is extremely picky about these definitions, which is a pain, but at least the system is consistent once you understand it. You aren't guessing like with SQL.
Anti-nuisance lawsuit warning: The purpose of these notes is to remind me, Zoegond, of stuff or to help me work stuff out. They may contain mistakes.
Quick
- ($a, $b....) = unpack("A2A7...", $packed)
- push( array, list )