... sunday but we want to start counting from Monday 00:00
v_FirstDateOfWeek = zoho.currentdate.toStartOfWeek().addDay(1).toString("yyyy-MM-dd");
//
// build up COQL Query
v_CoqlQuery = ...
... start in CRM format
v_SystemAppointmentDateTimeStart = v_SystemCallTime.toString("yyyy-MM-dd'T'HH:mm:00") + v_ApplicationTimeOffset;
//
// set system/application date time start in US format
v_CustomerAppointmentDateTimeStart ...
... timezone, add 10 minutes, re-assemble it in a format that CRM likes, and update the field:
//
// parse date into yyyy-MM-dd (using subString - reliable)
v_LeadCreatedDate = r_LeadDetails.get("Created_Time").subString(0,4) ...
... dates
l_AppointmentDates.add(v_NextWorkingDay);
//
// output and add 1 more day to loop
info v_NextWorkingDay.toString("EEEE") + " :: " + v_NextWorkingDay.toString("yyyy-MM-dd");
v_NextWorkingDay ...
... correction: I want to specify a from datetime
v_NowTime = '2021-09-21 21:27:15';
//
// now specify a to datetime (we're doing a working day so we add 1 business day)
v_NextTime = zoho.currentdate.addBusinessDay(1).toString("yyyy-MM-dd ...
... r_Staff in l_Staff
{
if(!isnull(r_Staff.get("id")))
{
v_StaffName = r_Staff.get("name");
}
}
Get the Available slots:
//
// get available slots
r_AvailableSlots = zoho.bookings.getAvailableSlots(v_ServiceID,v_StaffID,v_ThisDate.toString("dd-MM-yyyy"),"joels_connector");
l_AvailableSlot ...
... v_ThisFileSize = ifnull(m_ThisFile.get("file_Size"),"-");
v_ExpiryTime = zoho.currenttime.addMinutes(10).toString("dd-MMM-yyyy HH:mm:ss");
//
// put your own Publish key here (publish th ...
... date format), arrange so it can be sorted alphabetically in reverse order
v_DatePart = v_SortingKey.getPrefix("T").toDate().toString("yyyy-MM-dd");
v_TimePart = v_SortingKey.getSuffix("T").getPrefix("+").subString(0,5);
v_SqlDateTime ...
... can book longer than a month):
// set criteria to search for clashing annual leave dates (pre/post 1 month check)
l_SearchCriterias = List();
m_SearchCriteria = Map();
m_SearchCriteria.put("searchField","From");
m_SearchCriteria.put("searchOperator","After");
m_SearchCriteria.put("searchText",v_GivenDateFrom.subMonth(1).toString("dd-MMM-yyyy"));
l_SearchCriterias.add(m_SearchCriteria);
m_SearchCriteria ...
... now override fields specific to the newly cloned/duplicated record
m_Clone.put("Invoice_Status","Repeated Invoice");
m_Clone.put("Invoice_Date",zoho.currentdate.toString("yyyy-MM-dd"));
m_Clone.put("Due_Date",zoho.currentdate.addMonth(1).toStartOfMonth().subDay(1).toString("yyyy-MM-dd"));
// ...
... time field in Deluge
So annoying but sometimes you want to insert a date/time value into a date/time field and you get the error:
v_MyDateTimeString = zoho.currenttime.toString("yyyy-MM-dd'T'HH:mm:ssZ");
// ...
... and appending toTime() prematurely - DO NOT USE
v_CustomTime = "2020-03-25 20:41:07".toTime().toString("yyyy-MM-dd HH:mm:ss");
v_ExpiryTime = "2020-03-25T21:41:07+00:00";
info v_CustomTime.toTime();
info ...
What?
This code snippet took me a while to do and the documentation is flaky so I thought I'd make a note here just in case I need to refer to it again.
Why?
I want to modify a picklist and fill ...
... + v_NextRenewalDate.toString("MMMM, yyyy");
info v_ContractDateFormatted;
// yields Tuesday, 6th of November, 2018
Method #5:
if a list contains:
v_NextRenewalDate = '2018-11-06';
v_EnglishOrdinal ...
We use cookies to improve your experience on our website. By browsing this website, you agree to our use of cookies. Read more about our Privacy Policy.