What happens if I neglect to set an element in a variable defined as a Warehouse DATETIME data type ?
The Warehouse DATETIME data type is a composite data type. Defaulting will occur for any element that has not been explicitly set. The following code describes this : 1> 2> 3> define hours_minutes : string value “2230” 4> define dt : datetime 5> 6> * show the defaults 7> print date2str(dt,”YYYY-MM-DD HH24:MI”) 8> 9> * this initialization might not produce the results you expect 10> setvar dt = str2date(hours_minutes,”HH24MI”) 11> print date2str(dt,”YYYY-MM-DD HH24:MI”) 12> 13> * this initialization will 14> setvar dt = str2date(convert($today, “string”) || hours_minutes,”YYYYMMDDHH24MI”) 15> print date2str(dt,”YYYY-MM-DD HH24:MI”) 1901-01-01 00:00 1901-01-01 22:30 2000-12-21 22:30 The default values assigned to the Warehouse DATE and the TIME data types are identical to the default values assigned to DATETIME : 1> define d : date 2> define t : time 3> 4> print date2str(d,”YYYY-MM-DD”) 5> print date2str(t,”HH24:MI:SS”) 1901-01-01 00:00:00 How can I store a date/timestamp in milliseconds