Win a copy of Securing DevOps this week in the Security forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Date in SQL String has Wrong Syntax  RSS feed

 
Ranch Hand
Posts: 1823
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.
 
author & internet detective
Marshal
Posts: 37898
596
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: 1823
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.
 
Because those who mind don't matter and those who matter don't mind - Seuss. Tiny ad:
Thread Boost - a very different sort of advertising
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!