Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Date in SQL String has Wrong Syntax

 
Steve Dyke
Ranch Hand
Posts: 1722
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using the jquery datepicker to drive a request to gather data using a remote data sql call.

I get an error on some computers that the date syntax is wrong(03-17-2017).

I the javascript of my application index file I have this code:



I do not understand how the date format is changing on its way to the remote call code.
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 35977
422
Eclipse IDE Java VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Steve,
Is 03-17-2017 the desired syntax or what is getting passed to the database? Also, is jQuery the last time your application has control of the data? Or does it go to something on your server first?
 
Steve Dyke
Ranch Hand
Posts: 1722
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeanne Boyarsky wrote:Steve,
Is 03-17-2017 the desired syntax or what is getting passed to the database? Also, is jQuery the last time your application has control of the data? Or does it go to something on your server first?


My desired format is 03/17/2017.

I did find another javascript code that was formatting datepicker with dash style dates. I think this is the reason I am having issues.

Thanks for your help.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!