Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Purchases from Suppliers - No Data - SOLVED
11-29-2017, 11:26 PM,
#4
RE: Purchases from Suppliers - No Data - SOLVED
Actually looking at it Paul is correct and the code is wrong, the question is not so much why his doesn't work but why ours with d/m/Y format does work?

Long answer: Looking at the code the answer to the question is in the way the ConvertSQLDate() works. It is meant to be fed Y/m/d format date and if the default format is d/m/Y it reverses the order and gives a Y/m/d format date, but if the default format is m/d/Y it also creates a Y/m/d format date. However if the function is fed an incorrect date (in the format d/m/Y for Andy and m/d/Y for Paul), as happens in this script, it still works for Andy as it simply reverses it to an SQL format, but for Paul it creates an incorrect format.

Short answer: Paul's fix is correct, and if it is applied everyone's code will still work.

Tim
Reply


Messages In This Thread
RE: Purchases from Suppliers - No Data - SOLVED - by TimSchofield - 11-29-2017, 11:26 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)