Notifications
Announcements
Hi All,
I need to set default time 4 AM in employee state date field in new employee form (HcmWorkerNewWorker - Form)
I have writtten code like this,but its not working,
How to set default time at 4:00:00 AM in employee state date field.
Thanks in advance.
Please tell us more about your problem than mere "its not working".
Debug your code and tell us whether you get the right datetime value from newDateTime(). That will tell you whether you have a problem with getting the value or with putting the value to the form. Then you'll know which part to debug.
Hi PJ John,
Have you debugged the code. From the code what is the data value is coming in the form?
Thanks,
Girish S.
Hi Martin & Girish ,
Thanks for your reply, sorry for the delay in response.
In time1 variable i can get value of 14400 , whatever user selected in front end , i can get that date in date1 buffer, but the issue is value for time is not set in the employeeStartDate.dateTimeValue().Please guide me what i need to do.
Let me repeat my suggestion:
Hi Martin,
I am having issue in getting the value from datetimevalue(), it's having time as 12:00:00 .
Thanks
You're talking about a different thing. Please look at the return value of DateTimeUtil::newDateTime(). Is it correct or not?
It it is, but you can't assign the value to the control, we'll know that we can ignore all the other code and we need to focus on this piece only. For instance, maybe the control is bound to a data source field and you need to assign the value there. But that a speculation - the first step is to localize the problem.
Thanks for your reply , as you suggested i assigned value to the datasource field, now its working fine.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
Thanks to all of our 2025 Community Spotlight stars!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
André Arnaud de Cal... 663 Super User 2026 Season 1
Abhilash Warrier 289 Super User 2026 Season 1
Martin Dráb 232 Most Valuable Professional