If (TestDBTable.List.Current.TestDB.DateField = NullDate(),CurrDate(),#1900-01-01#)
Hi, I run into this problem also. I would want the date field to display "YYYY-MM-DD" instead of the default 1900-01-01.
I tried to to assign the date field variable, which is named ContractStart, with this value:
SyntaxEditor Code Snippet
If (ContractStart = NullDate(), "YYYY-MM-DD", ContractStart)
And, it won't allow me:
Date data type required instead of text.
Is there a workaround for this inorder for me to show "YYYY-MM-DD" if the user hasn't chosen a date?
I found the solution:
You need to click on the Date Input Box itself...in this case the -ContractStart
And then set the ff values:
Instead of setting the value (expecially since it needs do be a date and not a text) you should set the "Prompt" property of the input.
Setting the Prompt in the input to "YYYY-MM-DD" and the Null Value Property to NullDate() does the trick.
See the result here: https://my.outsystemscloud.com/Demos/Dates.aspx
The first input on my screen is just a simple input.The second one is exactly the same but has a Input_Calendar widget associated.
Hehe looks like you found it while I was doing my demo :)
Thank you Joao That's very helpful