cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with a date time variable

Sonia
Not applicable

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

1 ACCEPTED SOLUTION

rajeshjanapati
Executive Chef I
Executive Chef I

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.

 
 

Screenshot 2026-01-30 170707.pngScreenshot 2026-01-30 170755.png

 

View solution in original post

6 REPLIES 6

RussellJ
Deputy Chef II
Deputy Chef II

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

I did try both strftime and to date

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

 

 

rajeshjanapati
Executive Chef I
Executive Chef I

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.

 
 

Screenshot 2026-01-30 170707.pngScreenshot 2026-01-30 170755.png