Deluge Tips & Tricks: Mastering dates and times

Deluge Tips & Tricks: Mastering dates and times

Hello everyone!

We're bringing back our Deluge Tips & Tricks series, where we show you how to make the most of Deluge for achieving a wide range of use cases.

Working with dates and times is a fundamental part of almost any business application. Whether you're timestamping entries, scheduling tasks, or sending notifications, knowing how to manipulate date and time values in Deluge is a crucial skill.
 
Deluge provides simple yet powerful functions to help you fetch the current time, reformat values, and perform time zone conversions. This post highlights how Deluge can become your go-to for handling many different use cases.
 
Zoho variables 
Let's begin with the basics. Zoho variables are special predefined variables in Deluge that can be used across different Zoho services. Currently, Deluge offers two such variables related to dates and times: zoho.currentdate and zoho.currenttime. These return the current date, and the current date and time respectively, based on the format you've configured in the settings of the respective Zoho service. For more information, visit the Zoho Variables help doc.

While the aforementioned Zoho variables are your go-to for fetching the current date and time, their default format is primarily useful for basic logging. But, in many scenarios, you may need to display this information in a different format or even convert it to another time zone. Fortunately, Deluge has you covered. Let's take a look at how:

Customizing date and time formats   

Converting date formats
Different users often prefer different date formats when entering data, and Deluge makes it easy to handle these variations. For example, if you have a date stored as a string and need to convert it into a date variable, either to perform calculations or reformat it, you can use the toDate() and toString() built-in functions.

Here's a sample script which converts date from the dd/mm/yyyy format to the dd-mm-yyyy:

// Convert a string to a date variable

dateAsString = "03/12/2024 03:15:35";

dateObject = totime(dateAsString, "dd/MM/yyyy hh:mm:ss");

info dateObject;

// Convert the date object back to a string in a new format

info dateObject.toString("dd-MM-yyyy hh:mm:ss");

 

Converting time formats (24 hours to 12 hours)

You may sometimes need to switch between a 24-hour format and a 12-hour format when using zoho.currenttime. Thankfully, Deluge makes this simple. Here’s how you can do it:

currentTime = zoho.currenttime;

info currentTime.toString("dd-MM-YYYY hh:mm:ss a");

// Example output: 25-09-2025 11:11:11 AM

Handling time zone conversions  

In today's globalized world, your customers may be spread across different time zones, and to add to the complexity, large countries like the USA or Russia have multiple time zones even within their own borders. This can easily lead to head scratching scenarios when working with time-based data. Fortunately, Deluge has got your back here too.

The trick is to first convert the date-time string into a unixEpoch timestamp and then use toDateTimeString() to display it in the target time zone.

Converting your account's time to a user's time zone 

The zoho.currenttime variable returns the time based on the setting you've chosen. Let's assume that your account is set for IST (Indian Standard Time) and you want to display it for a user in Los Angeles. Here's how to do it:

// zoho.currenttime returns an IST time

datetimeString = "21-Aug-2025 15:50:13";

 

// Convert the string to a Unix timestamp

unixValue = datetimeString.unixEpoch();  

// Convert the Unix timestamp to a datetime string in the target timezone

info toDateTimeString(unixValue, "dd-MMM-yyyy hh:mm:ss", "America/Los_Angeles");

// Output: 21-Aug-2025 03:20:13

 

 

Converting between two specific time zones 

What's more, the same approach can also be applied to convert between two time zones. You can specify the source time zone during the Unix conversion to do this. This is particularly useful when your input string is from a known time zone that isn't your server's default.

 

The below script demonstrates time conversion from IST to Sydney time:

// Specify the source timezone (IST) when converting to Unix epoch

unixValue = "25-Aug-2025 14:28:53".unixEpoch("IST");

 

// Convert to the target timezone (Australia/Sydney)

info toDateTimeString(unixValue,"dd-MMM-yyyy HH:mm:ss","Australia/Sydney");

// Output: 25-Aug-2025 18:58:53

 

You can learn more about toTime and toDateTimeString functions at these help links.

 

We hope these tips help you handle date and time operations in your Deluge scripts more effectively—they can be used across all Zoho services that support Deluge.

 

Deluge is a vast and powerful language and we aim to help you master it to make your life easier. We'll be back with more tips and tricks soon, so stay tuned!

 

And if you have any questions or other cool tricks, please share them below!

 

Until next time,

The Deluge Team
      • Recent Topics

      • how to disable staff selection Zoho Booking integrated to SalesIQ?

        currently there is only one Consultant in my Zoho Bookings like this I integrate Zoho Bookings into Zoho SalesIQ to create a chatbot. Unfortunately, even though I only have one consultant for a consultation, the user have to pick the consultant. It will
      • Zoho Bookings No Sync with Outlook

        Zoho Bookings appointments are showing on my Outlook Calendar but Outlook events are not showing on Zoho Bookings. How do I fix this?
      • End Date in Zoho Bookings

        When I give my appointments a 30 minutes time I would expect the software not to even show the End Time.  But it actually makes the user pick an End Time.  Did I just miss a setting?  
      • Custom confirmation message

        How can I change the message that users see after they submit the booking form? I have to confirm some details before their appointment is officially "confirmed", so I want to change it where it doesn't say their appointment is "confirmed" but rather
      • Issue showing too many consultations in my workspace link.

        Hi Team, I’ve set up two Workspaces to track meetings from different sources. So far, this has been working well, and the two Workspaces are differentiated without any issues. However, when I navigate to Consultations and share the link to my personal
      • Improved RingCentral Integration

        We’d like to request an enhancement to the current RingCentral integration with Zoho. RingCentral now automatically generates call transcripts and AI-based call summaries (AI Notes) for each call, which are extremely helpful for support and sales teams.
      • Deluge sendmail in Zoho Desk schedule can't send email from a verified email address

        I am trying to add a scheduled action with ZDesk using a Deluge function that sends a weekly email to specific ticket client contacts I've already verified the email address for use in ZDesk, but sendmail won't allow it in its "from:" clause. I've attached
      • Zoho Learn & Zoho Connect

        Hi, Is there a way to sync the knowledge base we have in Zoho Learn with the manuals section is Zoho Connect? Thanks,
      • Addin Support in Zoho Sheet

        Is there any addin support available in zoho sheet as like google marketplace to enhance productivity by connecting with other apps, providing AI data analysis, streamlining business processes, and more?
      • Changing Corporate Structure - How Best to Adapt Current and Future Zoho Instances

        My current company is Company A LLC with a dba ("doing business as" - essentially an alias) Product Name B. Basically, Company A is the legal entity and Product Name B is what customers see, but it's all one business right now. We currently have a Zoho
      • how to add subform over sigma in the CRM

        my new module don't have any subform available any way to add this from sigma or from the crm
      • How to Install Zoho Workdrive Desktop Sync for Ubuntu?

        Hi. I am newbie to Linux / Ubuntu. I downloaded a tar.gz file from Workdrive for installing the Workdrive Desktop Sync tool. Can someone give me step by step guide on how to install this on Ubuntu? I am using Ubuntu 19.04. Regards Senthil
      • How to upload own video?

        How can you upload your own video on your zoho website? I do not want to use another host, but i want to insert my own files. how can i do this?
      • Support new line in CRM Multiline text field display in Zoho Deluge

        Hi brainstrust, We have a Zoho CRM field which is a Muti Line (Small) field. It has data in it that has a carriage return after each line: When I pull that data in via Deluge, it displays as: I'm hoping a way I can change it from: Freehand : ENABLED Chenille
      • Announcing new features in Trident for Windows (v.1.32.5.0)

        Hello Community! Trident for Windows just got better! This update includes new features designed to improve and simplify email and calendar management—and it includes a feature you’ve been waiting for. Let’s dive into what’s new! Save emails in EML or
      • How to render either thumbnail_url or preview_url or preview_data_url

        I get 401 Unauthorised when using these urls in the <img> tag src attribute. Guide me on how to use them!
      • Zoho CRM Calendar | Custom Buttons

        I'm working with my sales team to make our scheduling process easier for our team. We primary rely on Zoho CRM calendar to organize our events for our sales team. I was wondering if there is a way to add custom button in the Calendar view on events/meeting
      • Default Sorting on Related Lists

        Is it possible to set the default sorting options on the related lists. For example on the Contact Details view I have related lists for activities, emails, products cases, notes etc... currently: Activities 'created date' newest first Emails - 'created
      • Create Lead Button in Zoho CRM Dashboard

        Right now to create Leads in the CRM our team is going into the Lead module, selecting the "Create Lead" button, then building out the lead. Is there anyway to add the "Create Lead" button or some sort of short cut to the Zoho CRM Dashboard to cut out
      • Searching customer field

        Hello, When entering a receipt, we select customer information. The customer information is synced with Zoho CRM. However, we can't find the customer information because it searches for words that begin with the entered value. It needs to search for words
      • Introducing Version-3 APIs - Explore New APIs & Enhancements

        Happy to announce the release of Version 3 (V3) APIs with an easy to use interface, new APIs, and more examples to help you understand and access the APIs better. V3 APIs can be accessed through our new link, where you can explore our complete documentation,
      • Rotate an Image in Workdrive Image Editor

        I don't know if I'm just missing something, but my team needs a way to rotate images in Workdrive and save them at that new orientation. For example one of our ground crew members will take photos of job sites vertically (9:16) on his phone and upload
      • Resume Harvester: New Enhancements for Faster Sourcing

        We’re excited to share a set of enhancements to Resume Harvester that make sourcing faster and more flexible. These updates help you cut down on repetitive steps, manage auto searches more efficiently, and review candidate profiles with ease. Why we built
      • Zoho CRM Tracking Google Enhanced Conversions

        Can anyone @Zoho, consultants, or users help me understand if Zoho CRM is going to support Google's Enhanced Conversions? I included some information from Google below about it. We use Google Adwords for our pay per click advertising for lead generation,
      • zoho click, and nord VPN

        Unfortunately, we've been having problems with Zoho Click, where essentially the line cuts off after about a minute's worth of conversation every time we are on VPN. Is there a way we can change this within the settings so it does not cut the line off
      • Connecting Portals from different Zoho apps

        Hi, I note that Zoho has functionality for customer portals for several of the Zoho apps, like CRM, Projects, Desk etc. Is there any way to connect these portals?  It would be great if we could give our customers access to a portal in which they could
      • Billing Management: #5 Usage Billing

        After understanding the nuances of Advance Billing and Retainers, we will explore one of the booming billing models. Long ago, villagers drew water from a shared well in a small village. The well was a lifeline for the entire community. Ravi, the well
      • Function #10: Update item prices automatically based on the last transaction created

        In businesses, item prices are not always fixed and can fluctuate due to various factors. If you find yourself manually adjusting the item rates every time they change, we have the ideal time-saving solution for you. In today's post, we bring you custom
      • Inventory Adjustments

        Hi, How to transfer the material from one head to another ? Like materials purchased for manufacturing the laptop need to transfer from consumption inventory (Quantity of raw materials reduced) to destination inventory ( Quantity of Laptop increased)
      • Zoho CRM Community Digest - Aug 2025 | Part 1

        Hey everyone! The first half of August went by, and we have a few announcements and some good noteworthy discussions. So, let's take a look at them! Product Updates: Introducing Connected Records feature: Zoho CRM’s Next-Gen UI now includes Connected
      • Please make it easier to Pause syncing

        right now it takes 3 clicks to get there. sounds silly, but can you make it just 2 clicks to get it done instead? thats how dropbox does it, 2 clicks to pause instead of 3.
      • How to create a Zoho CRM report with 2 child modules

        Hi all, Is it possible to create a Zoho CRM report or chart with 2 child modules? After I add the first child module, the + button only adds another parent module. It won't let me add multiple child modules at once. We don't have Zoho Analytics and would
      • SalesIQとPageSenseの利用について

        初めての投稿で場違いだったらすいません。 弊社ではSalesIQを運用しているのですが、追加でPageSenseの導入もしたいと現場からの声があります。 両サービスともクッキー同意バナーが必要なサービスなのですが 弊社では同意無しに情報はとりませんという方針なので 2つ入れると2つバナーを出す必要がでてきます・・・ 両サービスを運用されてる方があれば運用状況とか教えてほしいです。 PageSenseについては詳細まで機能を理解してないなかでの質問です。
      • How to integrate Zoho Forms with Zoho CRM on Standard Plan

        Hello Zoho Support Team, I am using the Standard Zoho Forms plan (USD 30/user) and I would like to integrate Zoho Forms with Zoho CRM so that certain fields in my forms can be automatically prefilled using data from Deals in CRM. Specifically, I want
      • Export PDF File Name

        Is it possible to change the default Zoho .pdf naming scheme for inventory items like quotations? Would like to use the the Subject as the default quote name. Is this possible?
      • How to change the from address from 'no reply' for an email template in CRM

        Hi, We have our CRM set up with the from field as sales@XXX. I have just created a series of email templates and sent a test and they are sending from noreply@zoho I have tried searching for how to change the email template but don't have the options
      • Zoho CRM Client Script - SetCriteria in lookup Field

        Hello All One More Zoho CRM Client Script Tips & Trick. Now you can Set the Criteria on Your lookup in zoho CRM, It Comes With a Create Page, Edit Page, and Details Page (Standard). Example:- We have a Room Module that includes Room Name, Status, Campus,
      • Kaizen #71 - Client Script ZDKs for Detail (Canvas) Page

        Hello everyone! Welcome back to another interesting Kaizen post. In this post, we can discuss Client Script ZDKs support for Detail (Canvas) Page. What is Detail (Canvas) Page? A Detail(Canvas) Page allows you to customize the record detail page to your
      • Add Custom Reports To Dashboard or Home Tab

        Hi there, I think it would be great to be able to add our custom reports to the Home Tab or Dashboards. Thanks! Chad
      • Rich-text fields in Zoho CRM

        Hello everyone, We're thrilled to announce an important enhancement that will significantly enhance the readability and formatting capabilities of your information: rich text options for multi-line fields. With this update, you can now enjoy a more versatile
      • Next Page