List viewer component (days to go, image )

Hey,
so basically when the user selects a date from the date-input component and I wanna subtract it with the current date and show ( so and so days to go)
and this is the code I used:


and this is the output that i got it shows “Nan”:
Screenshot 2021-05-04 at 11.20.54 PM

1 Like

and beside the date, if I want to show the image selected by the user I used
Image 04-05-21 at 11.23 PM
but it shows the URL ?

1 Like

You’re asking Thunkable to do a math problem: “Subtract 03/16/21 from 4.” Even the best calculator isn’t going to know how to answer that.

You should Google date calculation Thunkable to get started with solving this tricky issue.

1 Like

It’s hard to debug one block. Are you setting an image’s picture to a url? That should work fine, as long as the url is actually a picture.

2 Likes

yes, mam
so basically user using photo library block they are gonna select a pic and using that we need to get the image source. SO basically the image should be shown ,its showing the URL

so do we need to use javascript for the same?