Kinetic App Studio - Capture Date Time

Hi Gentles,

In App Studio, I am trying to capture current date and time against an UD column. I am using
β€œ{Constant.Today}” but it is capturing only date and time is getting like 00:00:00.
image

Can anyone help me how to define the expression for DATETIME in App Studio?
image

Thanks in advance! :slight_smile:

1 Like

There is a constant called CurrentTime, but I don’t know how to put them together.

Might be easier to call a function.

Also, does that field support DateTime values? Or is it just date?

1 Like

Can you try the value CompanyTime.Now() or is that only available in configurator.

I see Epicor doing something like

"value": "#_(new Date(new Date('{TransView.StartDate}').getTime() - new Date('{TransView.StartDate}').getTimezoneOffset() * 60000)).toISOString()_#"

"value": "#_new Date(new Date().setMonth(new Date('{Constant.Today}').getMonth() + 1)).toISOString()_#"

#_{Constant.Today}.getTime() === %value%.getTime()_#

Perhaps you can just use the Date object in javascript yourself (new Date()).toLocaleString() are your value for example, might have do toISOString()

2 Likes