Hi,i tried change the creating date and time for internal note. In file class.thread.php found I this line:$sql=' INSERT INTO '.TICKET_THREAD_TABLE.' SET created=NOW() 'When i change created=NOW()tocreated=2016-01-15 14then I become a error message as follow:[ INSERT INTO ost_ticket_thread SET created=2016-01-15 14  ,thread_type='N' ,ticket_id=200 ...You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '14  ,thread_type='N' ,ticket_id=200 ,title='' ,format='html' ,staff_id=8 ,' at line 1<br /> <br />It seems the time is wrong. But the column "created" in DB is typ "datetime", so format 2016-01-15 14 seems all right.What is wrong? Can you help please?Thanks PH

Hello PavelH,

try this:

INSERT INTO ost_ticket_thread SET DATE_FORMAT(created, %Y-%m-%d %H:%i:%s) = 2016-01-15 14  ,thread_type='N' ,ticket_id=200 ...

Show at:http://www.w3schools.com/sql/func_date_format.asp

--> DATE_FORMAT

Best Regardscitrixraptor

Hello Citrixraptor,thanks for your answer, it show me the right way.Original was:$sql=' INSERT INTO '.TICKET_THREAD_TABLE.' SET created=NOW() 'Changet to:$sql=' INSERT INTO '.TICKET_THREAD_TABLE.' SET created='.db_input(date('Y-m-d H',(strtotime($own_datetime).' '.$vars)))So my MOD make a date and time boxes for internal note and if is filled out, is this internal note in DB writed with own date and time.

Hello PavelH,

>> Changet to:

>> $sql=' INSERT INTO '.TICKET_THREAD_TABLE.' SET created='.db_input(date('Y-m-d >> H',(strtotime($own_datetime).' '.$vars)))

Good Job

Best Regards

citrixraptor

Write a Reply...