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

    • Tip #7: Customize the appointment confirmation page

      A confirmation page plays a crucial role in creating the first impression, as that's where customers land when booking with you. It shows your brand identity, engages your audience, and drives more conversions. Yet, this section is often overlooked when
    • Add Image Upload Field to Zoho Bookings Registration Form

      Hi, We would like to request the addition of an image upload field to the Zoho Bookings registration form. Currently, Zoho Bookings only supports text-based fields (e.g., Single Line, Multi-Line, Email, Checkbox, Dropdown, Radio Button, and Date), but
    • Meeting integration with Otter.ai

      Would love for an integration with an AI transcription service like Otter.ai to be integrated with Zoho Meeting. Thanks
    • [Free webinar] AI agents in Zoho Creator - Creator Tech Connect

      Hello everyone, We’re excited to invite you to another edition of the Creator Tech Connect webinar. About Creator Tech Connect The Creator Tech Connect series is a free monthly webinar featuring in-depth technical sessions designed for developers, administrators,
    • プロフェッショナルプランで、見積作成時に原価と利益率を確認する代替案について

      現在、Zoho CRMのプロフェッショナルプランを利用しています。 海外から輸入した商品を販売しており、商品ごとに原価が異なるため、見積書を作成する際(または保存直後)に、その見積の原価合計と利益率を確認したいと考えています。 しかし、現在のプランではDeluge(関数)が使えず、見積書の「商品詳細」の項目をカスタマイズすることもできません。 1,見積作成画面で商品の原価を参照できるような、標準機能での工夫はありますか? 2,レポート機能を使って、見積単位での原価・利益を算出する方法はありますか?
    • Announcing Zoho Sheet desktop app for macOS and Windows (Beta)

      Hello Sheet users, We know you’ve been waiting for this one. It has always been the top priority on our roadmap to provide a single native desktop app for macOS and Windows that works both online and offline. Today, we are excited to announce that the
    • How to create a directory report from one-to-many relationship

      Hi all, Newbie here. I'm converting an Access DB to Creator. I've learned Forms are tables and Reports are used to edit table rows, not Forms. I've got the data loaded and can maintain it with the Reports already done. I've done filtering and sorting,
    • SalesIQ Email Delivery Issues to Microsoft

      Is anyone else having delivery issues to Hotmail, Outlook, and Live inboxes when sending transcripts and replies via email from SalesIQ? We’ve detected that emails sent from SalesIQ to these accounts aren't arriving—they don’t even bounce back; they simply
    • Moving Project Task to other parent not possible

      We are trying to move an existing Zoho Projects task to a different parent task via API. Example: Task ID: 289214000001385113 Current parent: 289214000001281044 New parent: 289214000001281045 We tested updating the task with: taskParam.put("parent_task_id",
    • Remove or hide default views

      I'm looking to only have the views pertinent to my organization. Is there a way to show only my custom views (or separate them to a different area or something)? If not, this should be a feature as switching from Zendesk we had this option...
    • Add more than 7 sender addresses in campaigns

      I need to add at least 15 sender email addresses but am currently limited to 7. Please can you increase. Thank you
    • Email sent to Hotmail arrives to Spam

      I'm sending email tests to my Hotmail account and they arrives to the Spam folder all the time. My domain has been verified correctly. How can I fix it?
    • Let’s Talk Recruit: Your pipeline is full. So why aren’t roles closing?

      Welcome back to Let’s Talk Recruit, where we break down hiring workflows into simple, actionable insights for recruiters. The focus this month is on what slows down your pipeline even when everything looks like it’s working. Picture this. You log in to
    • Mirror Component in Zoho CRM: Access real-time related data without leaving your record

      Hi everyone, This feature is now available for the JP, CA, SA, UAE, and AU DCs. We're excited to bring to you Zoho CRM's mirror component, which presents relevant data on a record's details page and keeps everything users need in one place without having
    • Search through email contents

      Is there a way to search through the email history of a lead? Meaning if among the 50 emails to a lead about different topics I want to find all the ones with the word "pizza" in the body of the email, is that possible? Thanks for your help, Hanan
    • Marketing Tip #9: Track your traffic sources

      Not all marketing channels work equally well. Knowing whether your visitors come from Google, Instagram, or email helps you focus on what actually drives sales. Try this today: Check your Zoho Commerce reports or connect Zoho PageSense to see your top
    • It Really Can Be This Simple

      Let's be honest.... Running a business already comes with enough moving parts. Invoices, payments, follow-ups, reminders, tracking who paid and who disappeared. It can slowly turn into a full-time admin job on its own, especially when you are a Sole Proprietor,
    • Huge confusion in zoho crm and zoho analytics

      Context => We have reporting based hierarchy in zoho crm and basically there will be one sales head and couple sales managers and 10 pre sales excutives divided between 2 sales managers we have maintained that in zoho crm and there is complex reporting
    • Zoho Books | Product updates | May 2026

      Hello users, We're back with the latest updates and enhancements we've rolled out in Zoho Books. From sales tax automation to scanning receipts for free, explore the updates designed to upgrade your bookkeeping experience. Sales Tax Automation [US & Canada
    • Update: [Issue fixed] Temporary access issue on Android and iOS devices

      Hello, Zoho Sheet users! We're aware that some of you are currently unable to open spreadsheet files from your Android and iOS devices. We extend our sincere apologies for the inconvenience caused. We're working on fixing the issue with highest priority
    • Action Required: Migrate Your SQL Server Connection

      Dear Users, Following our earlier communication on the upcoming Zoho Analytics security updates affecting Microsoft SQL Server connections, we have revised our recommended approach. The previously shared cipher suite configuration is no longer the recommended
    • Currency Change for Companies

      Hello FSM Team, We would like your assistance in changing the company currency for our UAE organization from AED to USD. Currently, all customers and users are configured with AED currency settings, and we would like to standardize the organization currency
    • Accrual Data - Zoho Books API

      Hi Team, When we integrate Zoho Books with Zoho Analytics, we usually receive a consolidated dataset called “Accrual Transactions,” which contains all types of transaction data. Could you please confirm whether it is possible to retrieve this same data
    • Bank Fees - Allow User to Choose Expense Account

      Bank fees from Customer Payments can only be debited against the system Bank Fees account due to hard-coding. The user should be able to select which expense account those fees are debited against. The use case is pretty straightforward. A business like
    • Showing Cost Price and Profit Margin in PDF

      Hi there, We use two different types of quotes in our company. One is a version for our clients that does not include cost or profit margin information, and the other is for our internal team that includes profit margin and cost. We are running into an
    • Side bar menu

      It would be great if you could stop the auto collapse of expanded menus when selecting a different module. It would save a lot of mouse clicks for a lot of users that frequently switch between sales & purchases as we do, it's easier to collapse them manually when not required !
    • Syncing zoho books into zoho crm

      I was wondering how I can use zoho books in crm as I have been using them separately and would like to sync the two. Is this possible and if so, how? Thanks
    • Remove horizontal scroll bar

      Is there any way to remove or hide the horizontal scroll bars on the iframe reports? I removed columns, but it still stays there.
    • Rich Text Type Format for Notes Field

      Has it been discussed or is there a way to insert a table in the notes field? We sometimes receive information in a table format, and it would be beneficial to have it in the same format as a note on a record. Moderation Update (12-May-26): We are working
    • Multiple Blueprints on different fields at the same time.

      It looks only 1 Blueprint can run at the same time, it makes sense for many Blueprints on the same field (Eg. Stage). But what about multiple Blueprints on "different" fields? the multiple options must be available. (Eg. Stage, Documents Status, Contract
    • sales IQ issue on website

      i integrated the zoho sales IQ code on the website but it is comming in distroted form i am sharing the screenshot below the website is bulit in wix platform
    • Contract to payment flow

      Hi everyone, I’m trying to set up a contract-to-payment flow and want to avoid duplicating invoices or customers in Zoho Books. The flow should be: contract generated from CRM, sent via Zoho Sign, client signs, deposit is paid, and the invoice should
    • Linking Contacts to Other Modules

      In creator, I've got a Contacts page with a lookup that searches Suppliers. Is there a way to have the contacts attached to the Suppliers modular as a list automatically, similar to the CRM version? It goes the other way. If I entered an Employee in the
    • Multiple Pipelines

      Is it possible to create multiple candidate pipelines?
    • Automation #7 - Auto-update Email Content to a Ticket

      This is a monthly series where we pick some common use cases that have been either discussed or most asked about in our community and explain how they can be achieved using one of the automation capabilities in Zoho Desk. Email is one of the most commonly
    • Introducing Custom Columns in Forecasts in Zoho CRM

      Release Plan: Enabling in Phased Manner, Enabled for JP DC Hello all, Forecasts in Zoho CRM help sales representatives, managers, and business stakeholders evaluate performance and plan future sales activities. While standard metrics such as Target, Achieved
    • How would you handle Warranty replacement parts or items in zoho inventory

      Hi everyone, I'm working on setting up zoho inventory for our distribution business.  We handle the service for our customers and will replace items that malfunction under a warranty basis.  Does anyone else do this and how do you set it up in inventory?  Do you have to create a sales order and if you want to the original item back, do you use a RMA?  If so, how is it done so there isn't a credit memo associated with it? Thanks, Tim
    • Atlassian Jira integration live in Zoho Apptics

      Tracking crashes and fixing them often happen with different tools. You might use Zoho Apptics to track crashes and understand what went wrong and Jira to resolve those issues. If you use both, you're probably familiar with the manual effort involved
    • What's New in Zoho Billing | January 2026

      Excited about the latest enhancements in Zoho Billing? Our January updates bring an intelligent AI assistant, smarter subscription management, and improved tax compliance, saving you time and reducing manual work. Dive into the details below to see how
    • Customising Outcome drop down

      Is it possible to customize the drop down list for appointment outcomes?
    • Next Page