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.
Can anyone help me how to define the expression for DATETIME in App Studio?
Thanks in advance!
1 Like
klincecum
(Kevin Lincecum)
September 24, 2024, 12:16pm
2
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
hkeric.wci
(Haso Keric)
September 24, 2024, 12:49pm
4
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