Getting a date-time field and returning just the time in a different format
I'm currently trying to write a script where it grabs a date-time field, reads only the time, and changes the time to a new time from a time field. So far this is what I have:
- eventTime = rec.Start.getTime();
- eventTime = eventTime.toString("yyy-MM-dd","HH:mm:ss");
-
info eventTime;
-
newHour = input.New_Time.getHour();
-
newMinutes = input.New_Time.getMinutes();
-
newSeconds = input.New_Time.getSeconds();
- newTime = newHour + ": " + newMinutes + ":" + newSeconds;
- newTime = newTime.toString();
- info newTime;
It's currently returning the time but I'm trying to figure out how to change the time. I first tried the toTime() and toString(), but it's not changing the format of it.
Zoho Desk Resources
-
Desk Community Learning Series
-
-
-
-
-
-
-
-
-
Zoho CRM Plus Resources
Zoho Books Resources
Zoho Subscriptions Resources
Zoho Projects Resources
Zoho Sprints Resources
Zoho Orchestly Resources
Zoho Creator Resources
Zoho WorkDrive Resources
Zoho Campaigns Resources
Zoho CRM Resources
Writer Get Started. Write Away!
Writer is a powerful online word processor, designed for collaborative work.