Skip to Content
0
Aug 11, 2023 at 07:09 PM

Datenow and dateformat issue

114 Views

Hello

I'd like calculate date in past by puting duration in days and result pass it to SQL Query for put in where statement as timestamp limit.

My fomula is below, unfortunetly in expression editor cliking evaulation no return value and terefore no SQL Query result

dateformat(dateadddays(datenow, -Transaction.duration), "yyyy-MM-dd'T'hh:mm:ss" , "dd/MM/yy" )

However part of above code:

dateadddays(datenow, -Transaction.duration)

return to me below date after click evaluate in expression editor:

2023-08-10T20:52:27

so date format is

yyyy-MM-dd'T'hh:mm:ss

but function dateformat cannot convert to my format "dd/MM/yy"

When I puting date string in expression editor instead 1st expression like "08/11/23" all is working fine. Where I made mistake?

Reference link

https://help.sap.com/docs/SAP_MANUFACTURING_INTEGRATION_AND_INTELLIGENCE/d70c3ac3566b41dd896cd7cecc94e14a/4cc6a33de8d47181e10000000a15822d.html?version=15.1.6

https://help.sap.com/docs/SAP_MANUFACTURING_INTEGRATION_AND_INTELLIGENCE/d70c3ac3566b41dd896cd7cecc94e14a/4cc8a0fc8e9b60c5e10000000a15822d.html