Today's Learning---

Today's Learning---
procedure ReplaceTime( var DateTimeVar : TDateTime; const NewTimeValue : TDateTime ) ;

replaces the time part of var DateTimevar with Time Part of NewTimeValue. Const NewTimeValue remains unaffected.

Comments

  1. I am trying to work out (in my head) what would/should happen if you want to pass in a negative NewTime...

    ReplyDelete
  2. A slight paradox that you can go thousands of years forwards, but not further back than 0BC.

    Also, there is something weird about going forwards as well...

    FormatDateTime('yyyy.mm.dd', 1000000000.0) = '52831.01.02'

    FormatDateTime('yyyy.mm.dd', 1500000000.0) = '45528.07.04'

    FormatDateTime('yyyy.mm.dd', 10000000000.0) = Integer overflow

    ReplyDelete
  3. Thankfully I will not be around to have to fix that issue :D

    ReplyDelete

Post a Comment