· Apr 13, 2018

Datatypes For Handling Date and Time in Persistent Classes

Hi, Community!

When I introduce a field to a persistent class to manage date/time what datatype should I prefer? 

%Date or %TimeStamp? And why?

Discussion (12)2
Log in or sign up to continue

Hi Robert,

Why did you say that the %TimeStamp datatype is the equivalent of the full $h? It's true that %Date/%Time do the conversion from internal date/time values to/from external. But %TimeStamp, %DateTime, and %StringTimeStamp  do not do any internal/external conversion. It's just for the YYYY-MM-DD HH:MM:SS external timestamp. Is there something I'm missing?

%PosixTimeStamp does convert, but it's not $h internally.