How to Assign NULL time in a variable of Time data type

How can I assign Null time to a variable of data type Time?

Hi Shounak,

Did you try with NullDate() ?
It will assign date time attribute to the null value i.e. 1900-01-01 00:00:00.

Let me know if you have any queries in this.

Regards,


Palak Patel wrote:

Hi Shounak,

Did you try with NullDate() ?
It will assign date time attribute to the null value i.e. 1900-01-01 00:00:00.

Let me know if you have any queries in this.

Regards,


This doesn't work. It expects Time 


Hi Shounak,

You can also use following:

TextToTime(NullIdentifier())


The output will be 00:00:00

Please make sure it will not affect your logic as its not recommended to use NULL timer.
Instead you can use can convert your Time field to DateTime field. In this case you will be able to use NullDate() function.

Regards,


Solution

Hello @Shounak

Little workaround:

DateTimeToTime(NullDate())

Use DateTimeToDate builtin function to convert the NullDate to a Time and it will work.

Another way is to assign a literal time value to the variable:

#00:00:00#

Cheers.

P.S. @Palak, it is better to use the proper conversions in this case.

Cheers.


Solution

Hi Shounak Devbhuti,

As Jauch said better to use workaround, since there no null value allowed in outsystem datetime field, Please find the documentation for reference.

Thanks all.... the solution is working perfectly :)