It has a knack but depends on what you need. It has to see what your database is waiting for. It is sending the data in a different type than expected by the database. So you need to find out what is the expected type and send this way.
SimpleDateFormat()
is for mounting strings even and not to format dates, because dates do not have format, dates are dates. Only texts that show dates have format. On a date what matters is the value contained in it and not the way it is presented.
In fact the author discovered that he needed to use Timestamp()
.
It has a knack but depends on what you need. Maybe your problem is not just using the
Date()
. Have want to see what your database is waiting for. You did not give details of how you are doing, did not put code.SimpleDateFormat()
is for mounting strings even and not to format dates, because dates do not have format, dates are dates. Only texts that show dates have format. On a date what matters is the value contained in it and not the way it is presented.– Maniero
@bigown Thanks for the tip guy, I was looking at the bank that is from a project made by third parties and he expected datetime, so I solved the problem just by changing from Date() to Timestamp().
– Raytek
I will reply not to leave unanswered.
– Maniero