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
Trigger workflows from SLA escalations in Zoho Desk?
Hey everyone, I’m currently working with SLA escalation rules in Zoho Desk and ran into a limitation that I’m hoping someone here has solved more elegantly. As far as I can tell, SLA escalations only support fairly limited actions (like changing the ticket
Delete a department or category
How do I delete a Department? Also, how do I delete a Category? This is pretty basic stuff here and it's impossible to find.
Zoho Webinar - Sharing System Audio (NOT AVAILABLE)
Hi, We are having a serious problem with Zoho Webinar. In the webinars we run, we very often share the audio from a video we are streaming directly from YouTube or other applications. Until recently we were using Zoom, but as we use other Zoho applications
Lost the ability to sort by ticket owner
Hi all, in the last week or so, we have lost the ability to sort tickets by Ticket Owner. Unlike the other columns which we can hover over and click on to sort, Ticket Owner is no longer clickable. Is it just us, or are other customers seeing this too?
Cancellation Fees
Hi, It really would be good if Billing could take subscription management further with cancellations & being able to apply or set a cancellation fee for a plan that is either fixed or prorated. It is not uncommon in subscriptions for cancellation fees
Custom Field for Subscription
Hi, I can't find a way to add a custom field (to contain a license key generated from our software) against a subscription? Is the only place to add this information in the Invoice module (as custom field for invoice)? When a customer views his subscription
Zoho CRM Meetings Module Issues
We have a use-case that is very common in today's world, but won't work in Zoho CRM. We have an SDR (Sales Development Rep) who makes many calls per day to Leads and Contacts, and schedules meetings for our primary Sales Reps. He does this by logging
Notes - Reaction Buttons
Using the native notes option within CRM is fine, it works and the RTF features are great, however, would it be possible - if there isnt already something in place, where we can add a reactions button, similar to teams/whatsapp to show that its been read
How to get the campaingns key?
Reading the documentations of the API, I see that is necessary have the campaign key, but I don't see how can I get it. For example to get the campaign details we need to do the request: https://campaigns.zoho.com/api/getcampaigndetails?authtoken=[API Authentication Token]&scope=CampaignsAPI&campaignkey=[campaignkey] I have the API Authentication Token but I don`t see how to generate the campaignkey
Unable to switch existing AWS RDS connection to DataBridge after moving RDS behind VPN
Unable to switch existing AWS RDS connection to DataBridge after moving RDS behind VPN Hi everyone, I’m facing a problem with an existing Zoho Analytics setup and would like to know the best migration path. Originally, my Zoho Analytics connection to
[Bug] WebAuthn passkey registration blocked on rpIds with TLDs longer than 6 characters (.accountant, .technology, etc.) — isValidDomain regex too strict
Hi, Filing on behalf of an enterprise customer where Zoho Vault is deployed across the company. The Chrome extension blocks WebAuthn passkey registration on legitimate sites whose Relying Party ID (rpId) has a TLD longer than 6 letters. This affects every
Native QuickBooks integration for Zoho CRM: Connecting sales and finance
Greetings, I hope all of you are doing well. We're excited to announce Zoho CRM's integration with QuickBooks Web, which is designed to synchronize your CRM data with your QuickBooks accounting records and bridge the gap between sales and finance. This
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
ZohoBooks_add_expense_attachment Fails
I'm working MCP in Claude to automate bookkeeping. Claude cannot seem to attach and reciept to an expense. The 'add expense attachment' tool is added to the server and enabled in Claude. I asked Claude to give me the calls he performed and this is what
ZohoBooks_create_chart_of_account
I'm setting up Claude to do my bookkeeping workflows using a Zoho MPC server I setup. He does not seem to be able to create a chart of account. The 'create chart of account' tool is added to the server and enabled in Claude. I asked Claude to give me
Zoho Books Product Road Map
I am planning to look into Zoho Books to maintain my Company's Account Books. Is the roadmap of Zoho Books Development available online? What happens if you product dies, without an export feature to other popular Accounting softwares like Tally or Quickbook. Are we going to be left in lurch? Do you have a product road map? Regards, Vishal.
I want to delete the email but I can't.
I want to delete emails but I can't, please help me. Thanks!
Error while creating new user
Zoho Mail is blacklisted on magicspam.com and spamauditor.org
As of today, the same problem with the IP addresses 136.143.188.51 and 136.143.188.52 How long does it take them to clear their IP addresses? I've read on this forum that these IP addresses have been blacklisted for years. //////////////////////// This
Unable to send emails from the delegated mailbox
currently it's not possible to send emails from our delegated mailbox (just in our own name, our own mail-accounts) The permissions granted include "Send as," and we are also unable to delete delegated employees or add new ones. We can only add employees
Change Password
How can I reset OR Change the Passwords for the Whole Organization at Once as Administrator using Admin Console?
Zoho Books bill pay option not available with zoho one
Why isn't Zoho Books bill pay add-on not available for Zoho one customers not even as a purchasable option. I think this is very inconvenient for companies wanting to use this feature all in one system
Support - what am I doing wrong?
Hi Everyone - I'm a new user and looking particularly for a replacement mail service. I'm just a home user not a professional but I do look after half a dozen domains. Zoho looks lovely and I'd like to switch but just want to get answers to a few 'easy'
Zoho Forms - Form Availability Redirect Option
Hi Forms Team, It would be great if there was a redirect URL option on the Form Availability settings. For example, I would like to create a support form which is only available outside business hours and if the current data and time is not Mon-Fri 9-5
Consider Making Printing Easier (UI)
I'm using Zoho Analytics in much the way that it was intended when it was "Zoho Reports" - as a way to pull together information across several apps in the ecosystem. I have a dashboard that I need to run each week for every employee (change the filter
Email Routing to Zoho from Cloudflare
Hello, I'm new to Cloudflare, having had my domain hosted on Fasthosts and just used it for email forwarding. I'm looking for a little help to configure my email routing/hosting. I've looked at the documentation but haven't found exactly what I need to
Emails
Good Morning, Is anyone else experiencing emails bouncing back? Thanks,
Secondary Reporting Manager permission level
Hi, same time last year I was speaking to Zoho about the use of a Secondary Reporting Manager and certain challenges that I was facing. at the time, I was told that this functionality did not exist. I am still facing challenges, so I would like to ask
アナリティクスで商談中のパイプライン(ステージ)の件数比較
アナリティクスで商談中のパイプライン(ステージ)の件数を前週と前々週で比較したい。前々週の件数が更新することで変動してしまう。対象方法をご教授ください。
why is my folder list is gone?
Hi, All my email folders are gone, i cant found any email. could you please check it?
Our ZOHO mail is not working
ZOHO mail is not working for any of our company's employees. All are able to access it in mobile. But not in laptops as a app or in webpage. please help asap.
Request to Release Email Aliases for Our Domain
Dear Zoho Support Team, Greetings, We are currently configuring the email system for our organization in Zoho Mail and encountered an issue while creating several email aliases. When attempting to create these aliases, we receive the following error message:
Changing Base Currency to USD (we are based in the UAE)
Hello everyone, Good day. We are based on the UAE and our bookkeeping is in USD. I followed the online resource that I select the country first where the currency I want as base is native then later on changed the country once the whole setup is done.
Error "The domain pinakajewels.com appears to be already in use in another organization. Learn More"
Hi Team, I have the following account with zoho mail Organization ID: 644368849 This zoho mail account was earlier mapped to www.senacareese.com I no longer own the domain www.senacareese.com I wish to map www.pinakajewels.com to the same zoho mail account.
Add personal Facebook to Zoho Social
Hi. is there any way i can post to my business and personal Facebook and Instagram at the same time when I make or schedule a post?
Option to Delete Chats in IM
Currently, there is no option to delete any chats in IM, regardless of their source.
Billing Status Update
Hello Latha, I’m working on a new automation (deluge) to fulfill one of our requirements. In this automation, there is a step to update the Work Order billing status from “Not Yet Invoiced” to “Non-Billable.” I tried to find the API information relevant
Please Enter Valid Amount
Where to enter amount while importing file in journal.?
How to create a custom motorbike rental contract based from the customer list and print it.
I would like to enter the customers information and then print out the contract with there name and information needed. how can I do this. I have the Zoho Books only. I'm just starting. Thanks
LAST YEARS TRANSACTIONS
How do I obtain a statement for transactions from last year - 2025
Next Page