How can we get the current date/time to be used within a Workflow?

I'm using a workflow to append to a dataset and I'd like to include the current date/time as a column in the dataset based on when the workflow was executed. Is there a way to capture this information?

Thanks!

Tagged:

Best Answer

  • MarkSnodgrass
    Answer ✓

    I would try using the Query Table tile and then pick any dataset and then write the following SQL query:
    SELECT CURDATE() As TodaysDate FROM Table_0 LIMIT 1

    image.png image.png
    **Check out my Domo Tips & Tricks Videos

    **Make sure to <3 any users posts that helped you.
    **Please mark as accepted the ones who solved your issue.

Answers

  • MarkSnodgrass
    Answer ✓

    I would try using the Query Table tile and then pick any dataset and then write the following SQL query:
    SELECT CURDATE() As TodaysDate FROM Table_0 LIMIT 1

    image.png image.png
    **Check out my Domo Tips & Tricks Videos

    **Make sure to <3 any users posts that helped you.
    **Please mark as accepted the ones who solved your issue.
  • zacpolin
    zacpolin Member

    Thank you @MarkSnodgrass! That worked. I actually updated it to to show the date and time.

    SELECT CONCAT(CURDATE(), ' ', CURTIME()) As DateTime FROM Table_0 LIMIT 1

  • DanHendriksen
    DanHendriksen Domo Employee

    That's a great way to handle it. You can also find a function in the Workflow Executions package that will give you metadata about the workflow.

    I know the team has "system variables" on the roadmap, where some of these things will just be automatically there as variables that can be used…stuff like who started it, when, etc… There's also plans to expose syntax for things like current date right in string builder.

  • If the objective is a column with the current date or date/time, why not just use a function tile?

    ** Was this post helpful? Click Agree or Like below. **
    ** Did this solve your problem? Accept it as a solution! **