I have a ruby on rails app, where the I have a meeting_time that is stored as a datetime type. I want to post it via an ajax call, but JavaScript seems to only have string or object. Is it possible to convert a string into a datetime in JavaScript before posting?
For example, meeting_time: "2016-11-02 02:31:00"
posts as a string, or I have tried date=new Date()
, but this returns an object.
Thanks!