Solved

Using Time in Custom Events

  • 6 October 2020
  • 2 replies
  • 203 views

Userlevel 1
Badge +2
  • Do Gooder (Customer)
  • 3 replies

Hi All

Im trying to create a custom event which needs to use the Time portion of a DATE field, in this case to run a check against Holiday Request records.  When I put the event code in as follows, it only seems to bring through the Date itself with the Time always being set to 00.00.00.  This is despite the Debug Console showing that the time being put into the database is something else such as 11.30.00.

Has anyone had any success with the use of Date and Time in custom events?

My event code currently is 

DECLARE

   TIME_TO_         TIMESTAMP := TO_TIMESTAMP('&NEW:TIME_TO', 'YYYY-MM-DD-HH.MI.SS');
BEGIN
error_sys.Record_General('',TIME_TO_);

END;

The error shows that only the Date part is filled.  I have tried DATE instead of TIMESTAMP with the same result

Cheers

Gareth

icon

Best answer by djay 6 October 2020, 10:21

View original

2 replies

Userlevel 3
Badge +7

Please check your event side what is the data type for “TIME_TO” column. If it is DATE change it to DATETIME.

 

 

Userlevel 1
Badge +2

Thanks Djay, this resolved the issue

Reply