Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Not a valid time format?
#8
(07-02-2020, 01:59 PM)Mikael Nilsson Wrote: if I changed it to this
UserSession.FDQryUsersMod.FieldByName('Uppldat').AsDateTime            := FormatDateTime('c',now);

I get a compiler error

[dcc32 Error] UserDetail.pas(470): E2010 Incompatible types: 'TDateTime' and 'string'

Yes, because FormatDateTime('c',now) generates a string. try to just set it to := now;
Reply


Messages In This Thread
Not a valid time format? - by Mikael Nilsson - 06-29-2020, 10:44 AM
RE: Not a valid time format? - by Mikael Nilsson - 07-02-2020, 09:24 AM
RE: Not a valid time format? - by Mikael Nilsson - 07-02-2020, 10:11 AM
RE: Not a valid time format? - by SorenJensen - 07-02-2020, 01:43 PM
RE: Not a valid time format? - by Mikael Nilsson - 07-02-2020, 01:59 PM
RE: Not a valid time format? - by SorenJensen - 07-02-2020, 02:08 PM
RE: Not a valid time format? - by SorenJensen - 07-02-2020, 03:31 PM
RE: Not a valid time format? - by Mikael Nilsson - 07-03-2020, 06:57 AM
RE: Not a valid time format? - by Mikael Nilsson - 07-03-2020, 12:35 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)