Memento Database Code

Job ID: 37132191

Budget: $10 – $30 AUD

I have a database app on my phone called memento.
I have a piece of code I wrote to send an sms directly from the database when you tap on a button and when it see s a date field it sends it like this
Thu Oct 12 2023 16:14:53 GMT=1100(ADET)
I was hoping if I use substring it would trim the date down to something like this
Thu Oct 12 2023
However in my code that I have attached it gives and error saying "cannot call method of substring in object Thu Oct 12 2023 16:14:53 GMT=1100(ADET)"
can someone take a look at my code and see what I am doing wrong please
Related categories: JavaScript Database Programming