I am trying to add a history record via events to customer orders when a variable area changes. But the date which I send as a sysdate is inserting wrong. I tried to format the date but it did not work. What is the correct format?
I am trying to add a history record via events to customer orders when a variable area changes. But the date which I send as a sysdate is inserting wrong. I tried to format the date but it did not work. What is the correct format?
Hi
It looks like you need to flip the date. At the moment you day is going in as the year and the year is going in as the day so you need YYYY-MM-DD.
Kind regards,
Lee Pinchbeck
Hi
I tried before it gives an error.
Hi
Are you able to translate the error? If you are able to provide the expanded detail of the error as well that should help.
Kind regards,
Lee Pinchbeck
Hi
The error says the Month should be 1 and the last day of the month. Thank you for your effort. I solve the problem. I saw variables on the right side then I cried :)
Hello
Have you solved your problem ?
If you've, could you please share the solution ?
Hi
To clarify the best answer post: rather than use sysdate and try to interpret how this should be formatted
Kind regards,
Lee Pinchbeck
Hi
Thank you for your answer. Actually I wonder if there is another way ?
I have the same problem but mine is in PLSQL.
You can see what i’ve experienced below.
I am looking for solution of that problem. Do you have any idea ?
Hi
Have you tried using CURRENT_DATE in the same manner as NOW was used in this posts example?
Kind regards,
Lee Pinchbeck
Sincerely.
Hi
You can use to_char(SYSDATE, 'YYYY-MM-DD-HH24.MI.SS') instead of TO_DATE(to_char(sysdate, ‘DD.MM.YYYY’), ‘DD.MM.YYYY’)
Regards,
Hasan
Hi
I’ve tried to_char(SYSDATE, 'YYYY-MM-DD-HH24.MI.SS').
Result is the same. It is inserted as 21/02/0025 to table.
Regards.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.