01-30-2026 02:00 AM
Hi, having bit of trouble with a data time variable, my datapill is in this format: 2026-01-29T06:01:28.000000-05:00 and using all possible hints from AI to convert it to YYYY-MM-DD HH:MM but it just returns: Error calculating input for field 'date':
wrong number of arguments (given 1
expected 0)
I'm only just starting my journey with workato
Solved! Go to Solution.
01-30-2026 03:40 AM
Hi @Sonia,
Yes, I too getting errors with strftime and .to_date and .to_time formula, but we need to walk through some work around solution with formula. but for instant thought, please check the below solutions.
01-30-2026 02:42 AM
Hi Sonia
You don't say how you're currently trying to do the conversion, but have you tried using the "strftime" formula? Documented here - https://docs.workato.com/en/formulas/date-formulas.html#strftime
Russell
01-30-2026 03:11 AM
I did try both strftime and to date
01-30-2026 11:56 AM
I'd like to explain why this didn't work and why @francbaviello provided the correct solution.
Your input value is a string data type. The string value is formatted as a standard ISO timestamp.
ISO timestamps can easily be converted to a date/time data type by using to_time.
strftime only accepts date/time data types as input. If you pass a string, it will fail. If you pass a date (to_date), it will fail.
You must go from string data type > date/time data type > strftime
"2026-01-29T06:01:28.000000-05:00".strftime()
## this will fail because strftime does not accept string
"2026-01-29T06:01:28.000000-05:00".to_date.strftime()
## this will fail because strftime does not accept date
"2026-01-29T06:01:28.000000-05:00".to_time.strftime()
## this will succeed because the input has been converted to date/time
02-02-2026 01:57 PM
Appreciated the detailed explanation Gary - thanks for your time on this 👍