02-05-2020 05:10 AM
Hi community,
So I have a date that comes from the source system as: 2020-02-23T00:00:00:000
I would like to convert that date to just 2020-02-23
Any thoughts?
Thanks.
Solved! Go to Solution.
02-05-2020 11:28 AM
The field is always there, but sometimes null.
What I did was this:
($DATEFIELD != null ? $DATEFIELD.toString().substr(0,10) : $DATEFIELD)
So that will just change the dates that are not equal to null.
02-05-2020 06:12 AM
How about converting it to a string in that format and taking the substring:
$myinputdate.toString().substr(0,10)
02-05-2020 06:38 AM
Hi @cstewart that could work, but produces errors if there are nulls, which can happen in that field.
02-05-2020 10:14 AM
Is the field always there, but sometimes has a value of null, or is it that the field itself may be missing?
02-05-2020 11:28 AM
The field is always there, but sometimes null.
What I did was this:
($DATEFIELD != null ? $DATEFIELD.toString().substr(0,10) : $DATEFIELD)
So that will just change the dates that are not equal to null.