I want to convert to date my coloumn date that I declare like String in my mongoDB schema
I want to convert to date my coloumn date that I declare like String in my mongoDB schema
pumba
Posts: 3Questions: 1Answers: 0
Link to test case:
Debugger code (debug.datatables.net):
Error messages shown: I dont have message error
Description of problem: When filtering with searchbuilder, regarding the date, I should have between and not between in the condition. But in my MongoDB schema, I declared the date as a string, so in the filter, it is treated as a string. I want to convert the date to the datetime type before the searchbuilder filter without changing my database declaration.
Answers
my script : script.
my function to register data on mu database :
Je vous remerci d'avance
You should just be able to use Luxon or Moment to specify the date format.
Those examples should get you going, but if not, we're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin