1310
Views
7
Comments
Default Value for DateAndTime

I want to set the NULL Identifier as the default value  for DateAndTime(), how can I do that ?

2025-04-17 05-42-16
Ajit Kurane

Hello Ramkumar,

you can put default value in property like this,

NullIdentifier()

Regards,

Ajit Kurane.


2022-01-04 05-57-06
Ramkumar Sudalaimani

Okay....If I doesn't fill the DateAndTime() field in User Interface ,it will show the default value of date like 1-Jan-1990 . Instead of that I want show the value as Empty or NULL value. How can I do that ?

2025-04-17 05-42-16
Ajit Kurane

Hello Ramkumar,

Please find the updated oml and let us know its working or not.

Regards,

Ajit Kurane.

date.oml
2022-01-04 05-57-06
Ramkumar Sudalaimani

Yeah ...It is working .

Thanks for your help..

UserImage.jpg
Dineshkumar Murugan

Hello Ramkumar,

We couldn't set NullIdentifier() as default value for DateandTime() instead we can set NullDate() as default value.

Kindly check the below image for your clarifications.


Regards,

Dinesh Kumar.

2025-05-11 04-57-37
Somesh Renganathan

Hi Ramkumar,

OutSystems saves null date time as 1900-01-01 00:00:00.

If you want to display empty values instead of 1900-01-01, make an expression with if condition to display empty text when the variable has NullDate().

If(Date=NullDate(),NullTextIdentifier(),Date)

Thanks.


2020-09-01 10-42-42
Stefano Valente

Like @Somesh Renganathan says: There is a nulldate(), which sets date to 1/1/1900 00:00:00.

This is also the default value for new datetime variables.


Outsystems does not have a real NULL as you might know in other languages.

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