azure-logic-appsworkflow-definition-language

Using a MS SQL Connector, how do you insert utcnow() into a datetime field?


utcnow() is one of the functions supported by logic apps.

https://msdn.microsoft.com/en-US/library/azure/dn948512.aspx#functions

I've tried using it in conjunction with an insert action from a SQL Connector to insert data into a table. The table has a datetime field that I'd like to populate with the date/time that the workflow performs the insert. I've tried the following:

  1. {@utcnow()} which results in the following error:

"Error reading date. Unexpected token: StartObject. Path '', line 1, position 1."

and this:

  1. @utcnow() which results in the following error:

"Error reading date. Unexpected token: Integer. Path '', line 1, position 1."

I'm hoping this is a silly formatting issue, because I'm not very familiar with logic apps' workflow definition language.

Thanks!


Solution

  • SQL connector got some new fixes related to Datetime. Now, no need to provide any quotes and it supports the date time of ISO 8601 (Round trip 'O).

    Examples are : 2015-06-01 19:15:45.000, 6/1/2015 7:15:45 PM or @utcnow().

    Hope this helps.