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

    • User Permission Log

      Our external auditors are asking for a way to view changes made to user permissions (basically, a user permission change log). Is this feature built into Creator? 
    • E-mail down

      We cannot get into our email inboxes, are you affected by a Microsoft update issue? How long do you think as to restoration?
    • ZOHO MAIL SERVICE NOT WORKING

      Hello i've a problem my zoho mail account says a display with this text "our service is temporally unavaible"
    • ايميل مجانى

      Can I create a free email account on Zahoo?
    • Sign up for email for a domain

      Hi - I thought I had signed up for a domain of <domain>.com, but only see the email of @zohomail.com . How do I get the <domain.com> domain linked to my email?
    • Feature Request: Include Creator-applicable Deluge updates in the Creator Release Notes

      I'd like to put forward a suggestion about how Deluge updates are surfaced to Zoho Creator developers, and I'm hoping the Creator team will consider it. Zoho Creator is built on Deluge. Every workflow, custom function, validation and schedule we write
    • Zoho Books | Product updates | June 2026

      Hello users, Welcome to this month's roundup of what's new in Zoho Books! We have an exciting line-up this time. The highlight is the launch of the all-new France Edition with full ISCA compliance. We're also introducing features such as Layout Rules
    • Partner with HDFC And Sbi Bank.

      Hdfc and sbi both are very popular bank if zoho books become partner with this banks then many of the zoho books users will benefit premium features of partnered banks.
    • name change of company in same GSTIN registration . how to retain historical company name for past transactions?

      hello I have recently change my company name from BHANU DIAM to BHANUMATI IMPEX in same GSTIN registration number While i have update the company name in profile name that change all my historic data like sale invoices and purchase bill , i would like
    • AUTOMATION OF INVOICE PROCESSING

      Dear Zoho Books Product Team, I hope this message finds you well. I’m reaching out as a dedicated Zoho Books user with a product idea that I genuinely believe could transform how businesses handle purchase invoicing — and set Zoho Books apart as the smartest
    • Zoho Books | Product updates | July 2026

      Hello users, We’re excited to bring you the latest updates in Zoho Books for July 2026! This month's release introduces Terminal Payments, CMP-08 filing for composition taxpayers, SEPA Credit Transfer support, the new Receipts and Payments Report for
    • Zoho ERP | Product updates | June 2026

      Hello users, We launched Zoho ERP on January 23, and since then, our goal has been to help businesses streamline and manage their operations with greater efficiency, flexibility, and control. Since the launch, we've continued to enhance the platform every
    • Solution to Import OST File into Office 365.

      In today’s digital workplace, organizations are rapidly moving toward cloud-based email systems for better flexibility, security, and collaboration. Microsoft 365 has become one of the most widely used platforms for business communication. A common requirement
    • Zia AI capabilities now available in all paid editions

      Hello everyone, We are expanding the availability of AI-powered features in Desk to the other paid subscriptions from 7th July 2026. Right now, the following AI-based features are available for Enterprise edition users: Intelligence: Sentiment analysis,
    • Zoho Contacts *Web Interface Does Not Load* (Tested in Firefox, Safari)

      When trying to load https://contacts.zoho.com the error shown in the console is: The resource from “https://static.zohocdn.com/zmail/zm/newContactsChange11/js/main.js” was blocked due to MIME type (“application/json”) mismatch (X-Content-Type-Options:
    • Admin-Side Calendar Delegation from the Admin Console (Parity with Zoho Mail Mailbox Delegation)

      Summary Zoho Mail already lets organization admins delegate a user's mailbox to another user directly from the Admin Console — no approval from the mailbox owner required (Users > select user > Mail Settings > Delegated to > + Add). Zoho Calendar has
    • Cliq iOS can't see shared screen

      Hello, I had this morning a video call with a colleague. She is using Cliq Desktop MacOS and wanted to share her screen with me. I'm on iPad. I noticed, while she shared her screen, I could only see her video, but not the shared screen... Does Cliq iOS is able to display shared screen, or is it somewhere else to be found ? Regards
    • How use .PK12 certifcate for sign

      Hello! Is it possible to use my personal digital certificate (as a COMMODO .pk12) to sign documents? Thank you
    • Automating CRM backup storage?

      Hi there, We've recently set up automatic backups for our Zoho CRM account. We were hoping that the backup functionality would not require any manual work on our end, but it seems that we are always required to download the backups ourselves, store them,
    • Blueprint - Mandatory file upload field

      Hi, File upload (as we as image upload) field cannot be set as mandatory during a blueprint transition. Is there a workaround? Setting attachments as mandatory doesn't solve this need as we have no control over which attachments are added, nor can we
    • Completed Calls don't associate with Scheduled Calls

      I schedule calls at specific times so that they are easily viewable on my phone. I open a given call on my phone and use the call icon at the bottom of the screen. I complete the call and select "yes" when asked if I want to log the call. I enter the
    • Integrations of freelancing websites

      It is a customized effort which we require to be implemented on our Zoho recruit. We want that Upwork and Freelancer and other such freelancing websites get integrated into our Zoho Recruit, so that, any communication which we do with the candidates from those websites gets directly recorded on our Zoho recruit and we don't have to move back and forth by opening any other application other than Zoho. If this can be done, we think of managing the entire communication through Zoho recruit and use it
    • Workflow Preventing others from editing

      Using workflows in WorkDrive to implement a document review process has been extremely helpful in my organization. The only problem is that other users who have access to the document via standard document sharing rules are unable to edit the document.
    • MCP > Creator connection failing with Claude

      I'm trying to get claude to access any of my Zoho Creator apps and it keeps failing. I have enabled all tools for creator and ensured in claude settings that everything is authorised. Here is what claude says : Unfortunately, the error messages I'm receiving
    • Zoho Analytics UI Bug

      Hello, all, The Aggregate Formulas in Zoho Analytics' list of fields have a 3-dot menu: If the formula has a long name, the name is not fully visible in the list, and a 3-dot menu is not accessible from it: This is not convenient, especially when the
    • Poor Zoho Support

      Been trying to reach support via telephone and email. The support has always been slow to respond but now its been two weeks without a return call. I have even sent them screen shots of the problem I've having with no results. Is anyone had the same problem.
    • Help me recover my account

      business@heymods.mobi is an account I registered two years ago. My domain is no longer valid, and I cannot access the admin page. I also subscribed to a $12 service, but I cannot configure the domain. Please help me set xunmeng.app@gmail.com as the admin,
    • I cannot receive emails

      I cannot receive email sent to my personal email account. I can send them but not receive them. I don't have a domain. Zoho direct email. Please help
    • What's New in Zoho Inventory | June 2026

      Hello users, June 2026 introduces a range of exciting enhancements to Zoho Inventory. With the full rollout of the Zoho Inventory Windows application, the launch of Terminal Payments, and new tracking combinations in Advanced Inventory Tracking, you can
    • I don't have access to my signup email.

      Hi, I don't have access to my signup email. I signed up while using the Loveabe app. I don't have access to the app that I built with the email ramonsepulveda@dreamgiftsfinder.com. Please help me cancel my account with you through that email.
    • Update on default settings for AI features in Cliq

      Hello all, We'd like to provide clarity on a recent change to AI feature defaults in Cliq. As part of our regular review of AI features conducted in April 2026, we re-evaluated how these features are enabled by default. We've decided that the AI features
    • Zoho CRM custom button function, how to add line breaks/ new lines in the return message

      When creating button function in CRM it requires a `return "";` Then when the button is client by the user a message pops up with what ever is returned from the function. But I want to have a message with multiple lines, meaning I need to add a line break
    • Email not Received

      No email has been recieved except welcome email and one more email in 2025.
    • i cant renew my domain bfftube.cloudns.cc

      i cant renew my domain bfftube.cloudns.cc because its a free subdomain from cloudns and you cant renew it its always active can some fix this becasue again there is no way to renew it becasue its free subdomain and again its always active
    • Custom Button Creation from Layout Editor in Zoho CRM

      Hello All, Buttons in Zoho CRM act as triggers that perform a specific action when clicked. Zoho CRM includes a set of system buttons that help you carry out common actions with a single click. Beyond these, your organization can create custom buttons
    • Mise à jour de Zoho Books – France

      Chers clients, Merci pour votre patience et votre soutien continu. Avec les évolutions réglementaires à venir en France nous introduisons de nouvelles fonctionnalités dans Zoho Books pour les clients français. Ces mises à jour ont été conçues pour répondre
    • How to Switch from Outlook for Mac to Outlook for Windows

      The most often used file formats for users to manage crucial data are OLM and PST files. PST files keep a copy of data on the configured system from Outlook, while the OLM file contains the Mac Outlook data items, which are only accessible with Outlook
    • Different languages for users

      Hello, Do you plan to enable individual users to select their languages for interface? Currently language can be changed for everyone - it looks like a settings for a whole portal, which is not good when you are working internationally. Best regards,
    • Issues migrating Google email

      I am considering Zoho because Google will start charging for G Suite legacy free edition.    So, a key element in my decision is the ability to migrate as much from Google as possible.  I am giving email a try first, but after hours of trying, I can't
    • "Print" option of GET Expense Report API not working

      Hello! I have been trying to use the "print" option of the GET Expense Report API but it seems the option does not alter the output. Is there an issue with the API or am I using it wrong? Here's my request code, in Deluge: response = invokeurl [ url :"https://www.zohoapis.com/expense/v1/expensereports/"
    • Next Page