2414
Views
6
Comments
Solved
How to Assign NULL time in a variable of Time data type
Question

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

2020-02-28 09-46-54
Eduardo Jauch
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.


2026-03-16 00-00-40
Palak Patel

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,


2025-02-11 13-01-16
Shounak Devbhuti

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 


2026-03-16 00-00-40
Palak Patel

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,


2020-02-28 09-46-54
Eduardo Jauch
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.


2019-01-04 10-45-45
Sravan Vanteru

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.

2025-02-11 13-01-16
Shounak Devbhuti

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

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.