Skip to main content
Solved

About Customer Order History Api


hhy38
Superhero (Customer)
Forum|alt.badge.img+16
  • Superhero (Customer)

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?

 

Wrong Date
​​

 

Best answer by hhy38

Hi @Lee Pinchbeck,

 

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 :)

 

 

 

View original
This topic has been closed for comments

Lee Pinchbeck
Ultimate Hero
Forum|alt.badge.img+24

Hi @hhy38,

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


hhy38
Superhero (Customer)
Forum|alt.badge.img+16
  • Superhero (Customer)
  • November 30, 2020

Hi @Lee Pinchbeck,

 

I tried before it gives an error. 

 


Lee Pinchbeck
Ultimate Hero
Forum|alt.badge.img+24

Hi @hhy38,

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


hhy38
Superhero (Customer)
Forum|alt.badge.img+16
  • Superhero (Customer)
  • November 30, 2020

Hi @Lee Pinchbeck,

 

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 :)

 

 

 


Forum|alt.badge.img+5
  • Sidekick (Customer)
  • February 25, 2021

Hello @hhy38 ,

 

Have you solved your problem ?

If you've, could you please share the solution ? 


Lee Pinchbeck
Ultimate Hero
Forum|alt.badge.img+24

Hi @cilik,

To clarify the best answer post: rather than use sysdate and try to interpret how this should be formatted @hhy38 instead used the available variable NOW which does that all for you.

Kind regards,

Lee Pinchbeck


Forum|alt.badge.img+5
  • Sidekick (Customer)
  • February 25, 2021

Hi @Lee Pinchbeck 

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 ?  

 


Lee Pinchbeck
Ultimate Hero
Forum|alt.badge.img+24

Hi @cilik,

Have you tried using CURRENT_DATE in the same manner as NOW was used in this posts example?

Kind regards,

Lee Pinchbeck


Forum|alt.badge.img+5
  • Sidekick (Customer)
  • February 25, 2021

@Lee Pinchbeck yes I’ve. Unfortunatelly it doesn’t work. 

Sincerely.


hhy38
Superhero (Customer)
Forum|alt.badge.img+16
  • Superhero (Customer)
  • February 25, 2021

Hi @cilik,

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


Forum|alt.badge.img+5
  • Sidekick (Customer)
  • February 25, 2021

Hi @hhy38,

  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.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings