This topic contains 5 replies, has 0 voices, and was last updated by mushrush 7 years, 6 months ago.
-
AuthorPosts
-
April 27, 2017 at 12:19 pm #9961
steven_stewartI sure need some help with this one. I thought this would be simple….
Essentially, I built a custom record to track pieces of work, worked. I have a Time Started field that basically grabs the current date AND time (I need the seconds as well), this is working. I then have a Time Closed field, I need this field to grab the current date and time (including seconds, e.g. 12:59:36PM) when the custom field “Status” is set to closed. I would like it to happen after record submit. The closest I could get so far was to build a workflow that has a Set Value action. In the Set Value action, I put “current_date” in the formula field for the field I want to set the value of. While this does work, the time is 4 hours off what it should be… If anyone could help with this I would be GREATLY appreciative. Thanks in advance for any info at all!
Best Regards,
Steven
This is a cached copy. Click here to see the original post. -
April 27, 2017 at 10:32 pm #9962
k_duncHi Steven,
What ‘current_date’ formula did you use? Have you tried “{today}” in the formula field? Have you tried selecting “Today” from the Date drop-down box (depending on what the Field Type is that you’re using – probably Time of Day?).
When you look at System Notes, is your date / timestamp correct?
-
April 28, 2017 at 11:40 am #9963
MikeBucklaewsteven_stewart Workflows and server scripts execute in the server timezone which I believe is Pacific time. Anything browser/client related uses the local device time.
-
May 1, 2017 at 11:35 am #9964
steven_stewartHi Kirk,
{Today} won’t work because I’m doing it After Record Submit, it doesn’t appears an option, I could try it manually just to see. Kirk/Mike, do you know of any way to get it in the correct timezone (e.g. adding something to the formula)? The whole issue is I need to be able to track the amount of time between open and closed down to the second. I feel like I’m over-thinking it..
-
May 1, 2017 at 11:57 am #9965
MikeBucklaewI’m not sure there’s an easy way to do it with just a formula in the workflow. I think I would create a workflow action script to take advantage of the SS DateTime Time Zone API. (SuiteAnswers ID: 31875)
-
May 1, 2017 at 2:50 pm #9966
mushrushYou could try this: TO_CHAR(LOCALTIMESTAMP, ‘DD-MON-RR HH:MI:SS PM’)
Put that in as your formula. Adjust to fit your format.
I’m not 100% positive, but dealing with date/time in NetSuite is tricky. You many need to do some weird date/time math to convert from server time or user time to be a constant across your company.
Thanks!
-
AuthorPosts
You must be logged in to reply to this topic.