For Zoho services only


I'm currently part of a wider delivery team at Ascent Business Solutions, recognised as a leading Zoho Premium Solutions Partner in the United Kingdom.

Ascent Business Solutions support organisations with everything from targeted technical fixes through to full Zoho CRM implementations and long-term platform adoption. Working as a team rather than a one-person consultancy allows projects to move forward consistently, with access to the right skills at each stage.

The team I manage specialises in API integrations between Zoho and third-party finance and commerce platforms such as Xero, Shopify, WooCommerce, and eBay. Much of our work involves solving integration challenges that fall outside standard documentation, supporting new ideas, new sectors, and evolving business models.

Success is measured through practical outcomes and return on investment, ranging from scaling small operations into high-turnover businesses to delivering rapid gains through online payments, automation, and streamlined digital workflows.

If you are looking for structured Zoho expertise backed by an established consultancy, you can contact Ascent Business Solutions on 0121 392 8140 (UK), email info@ascentbusiness.co.uk, or visit https://www.ascentbusiness.co.uk.

Zoho Deluge - Get Full Day Name

What?
This is a very quick note with the code to retrieve the full day name from a date (eg. "Monday").

Why?
If I use the toString() function to get the day, it only returns the first 3 letters of the day (eg. "Mon").
copyraw
My_Date = today;
Day_Name = My_Date.toString("E");  // returns "Mon"
  1.  My_Date = today; 
  2.  Day_Name = My_Date.toString("E");  // returns "Mon" 
How?
Well a few methods.

Method #0: Update 2020
Tested in CRM and Creator and this is working:
copyraw
My_Date = today;
Day_Name = My_Date.toString("EEEE");  // returns "Monday"
  1.  My_Date = today; 
  2.  Day_Name = My_Date.toString("EEEE");  // returns "Monday" 

Method #1:
We're going to populate two arrays / lists; retrieve the index value; and use this in the second array as follows:
copyraw
// lists
	Day_Names = List:String({"Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"});
	Day_Abbreviations = List:String({"Mon","Tue","Wed","Thu","Fri","Sat","Sun"});

	// get date field day abbreviation
	Day_Abbreviation = My_Date.toString("E");   

	// find in array and return same index from first array
	Day_Name = Day_Names.get(Day_Abbreviations.indexOf(Day_Abbreviation));
  1.  // lists 
  2.      Day_Names = List:String({"Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"})
  3.      Day_Abbreviations = List:String({"Mon","Tue","Wed","Thu","Fri","Sat","Sun"})
  4.   
  5.      // get date field day abbreviation 
  6.      Day_Abbreviation = My_Date.toString("E")
  7.   
  8.      // find in array and return same index from first array 
  9.      Day_Name = Day_Names.get(Day_Abbreviations.indexOf(Day_Abbreviation))
Reducing the code lines but using the same technique as above:
copyraw
Day_Names = List:String({"Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"});
	Day_Abbreviations = List:String({"Mon","Tue","Wed","Thu","Fri","Sat","Sun"});
	Day_Name = Day_Names.get(Day_Abbreviations.indexOf(My_Date.toString("E")));
  1.  Day_Names = List:String({"Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"})
  2.      Day_Abbreviations = List:String({"Mon","Tue","Wed","Thu","Fri","Sat","Sun"})
  3.      Day_Name = Day_Names.get(Day_Abbreviations.indexOf(My_Date.toString("E")))

Method #2:
Using a map, we can reduce this to two lines of code:
copyraw
Day_Map = {"Mon":"Monday","Tue":"Tuesday","Wed":"Wednesday","Thu":"Thursday","Fri":"Friday","Sat":"Saturday","Sun":"Sunday"};
	Day_Name = Day_Map.get(My_Date.toString("E"));
  1.  Day_Map = {"Mon":"Monday","Tue":"Tuesday","Wed":"Wednesday","Thu":"Thursday","Fri":"Friday","Sat":"Saturday","Sun":"Sunday"}
  2.      Day_Name = Day_Map.get(My_Date.toString("E"))

Method #3:
Using a list, the inevitable single line:
copyraw
Day_Name = ",Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".toList(",").get(My_Date.toDate().getDayOfWeek());
  1.  Day_Name = ",Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".toList(",").get(My_Date.toDate().getDayOfWeek())
Category: Zoho Deluge :: Article: 223

Credit where Credit is Due:


Feel free to copy, redistribute and share this information. All that we ask is that you attribute credit and possibly even a link back to this website as it really helps in our search engine rankings.

Disclaimer: Please note that the information provided on this website is intended for informational purposes only and does not represent a warranty. The opinions expressed are those of the author only. We recommend testing any solutions in a development environment before implementing them in production. The articles are based on our good faith efforts and were current at the time of writing, reflecting our practical experience in a commercial setting.

Thank you for visiting and, as always, we hope this website was of some use to you!

Kind Regards,

Joel Lipman
www.joellipman.com