Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

How to delete a datetime value ?

associationp157
Level 2
Level 2

Hello

I need to delete a value from a colum which type is datetime

I'm doing it Inside a worflow (update component) because I'm updating other fields

I tried to use the NULL value in my Update compoennt, like I did to erase String value but it does not work.

I have an error message saying that NULL (type: string) does not match with the destination field type (type: datetime).

What should I do in order to delete my dateitme value ?

Thanks for your feedbacks

Corinne

1 Accepted Solution
Amit_Kumar
Correct answer by
Community Advisor
Community Advisor

Hi Corinne,

Since DateTime is a value type you cannot assign null to it, but exactly for these cases (absence of a value), You can set a DateTime variable to MinTime but the variable itself cannot be null. To get this MinTime use: ToDateTime() as expression with empty params. which will set your date to 02-01-1900 00:00:00

1438621_pastedImage_0.png

Regards,

Amit

View solution in original post

1 Reply
Amit_Kumar
Correct answer by
Community Advisor
Community Advisor

Hi Corinne,

Since DateTime is a value type you cannot assign null to it, but exactly for these cases (absence of a value), You can set a DateTime variable to MinTime but the variable itself cannot be null. To get this MinTime use: ToDateTime() as expression with empty params. which will set your date to 02-01-1900 00:00:00

1438621_pastedImage_0.png

Regards,

Amit

View solution in original post