• DOCUMENTATION
  • WORKATO BLOG
  • PRODUCT BLOG
  • Return to Workato
  • Log in
  • ☰
  • Community/Discussions
Solution home App Resources Netsuite

How to successfully sync date fields in Netsuite

Modified on: Sun, Jan 22, 2017 at 10:13 AM

When trying to parse the date fields from the output of one Netsuite step to another, you may encounter errors as such: 

  • Error calculating input for field 'startDate': invalid date
  • Invalid dateTime format: 2017-02-01
  • #<ArgumentError: wrong number of arguments (given 1, expected 0)>


To successfully map your date across, follow these steps.


Method 1: Check the input date pill's data type and value format

If the input date pill contains a string and is in the format of yyyy-mm-dd or yyyy/mm/dd or dd-mm-yyyy or dd/mm/yy, there is no need to turn on formula mode for the field. 


Method 2: Format the string into an appropriate date using .to_date

Else, format the string into an appropriate date using the .to_date function. One example for the format would be %m-%d-%y. Refer to this for more information on date formats. 


Method 3: Change the timezone and and format the string with strftime

If you are still encountering errors with mapping the date, you might need to add a function to adjust the timezone appropriately. For example, the formula to use would be

(Date Pill).in_time_zone("US/Pacific").strftime("%Y-%m-%dT%H:%M:%S%z")


Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.

Related Articles

    Still can't find your solution?

    Visit our forums to search for answers, or post your own questions.

    Documentation
    Developer's Library
    Tutorials
    eBooks
    Product Hour
    Product Blog
    Workato Blog
    Product updates
    Customer Stories
    © Workato 2020   Privacy   Terms   +1 (844) 469-6752
    • Documentation
    • Workato Blog
    • Product Blog
    • Solutions
    • Forums
    • Tickets
    • Log in
    • Return to Workato