Hi All,
I am using version 8.6.21 along with Delphi XE3.
When I post a value to a date/time field the time value seems to drop off.
The code looks something like this:
    mysqlqry.Append;
    mysqlqry.FieldByName('datefield').AsDateTime := Now;
    mysqlqry.Post;
So right before the post the value in  mysqlqry.FieldByName('datefield').AsDateTime is 2/6/2016 2:06:19 PM but right after posting it 2/6/2016.
Thanks
			
									
									
						Date/Time field dropping time value after .post
Re: Date/Time field dropping time value after .post
The DATE server type allows to store only date, TIME - only time. Therefore, on execution of your code, the DATE field will store only current date. To store a date-time value, you should use the DATETIME or TIMESTAMP server types.
			
									
									
						Re: Date/Time field dropping time value after .post
The server field type is DATETIME.
			
									
									
						Re: Date/Time field dropping time value after .post
Unfortunately, we couldn't reproduce the issue: when executing your code, correct data and time were saved to a DATETIME field. To investigate the issue, please compose a small  sample demonstrating the described behavior and send it to us, including scripts for creating database objects.