Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.

How to use function in R tool?


I am using R tool inside Alteryx and want to populate certain rows with today's date. It is giving me error that it could not find that function. I also tried to use DateTimeToday() inside R but it also shows error. I don't want to use formula tool to add today's date and want to achieve the same inside R. Could someone help me out here?

Community Content Engineer
Community Content Engineer

Hi @sam2


I was able to use the R Sys.Date() function in the R Tool, appending the current date to a new column in a data frame with the following code.


##read in data frame
data <- read.Alteryx('#1')

##append new column with today's date
data$date <- Sys.Date()

##write out data frame
write.Alteryx(data, 1)

I've also attached the workflow. Can you please share the error you are getting, along with your code? I would be happy to help you troubleshoot.






Hi @SydneyF


It turns out that Alteryx is case sensitive. I was using "" instead of "Sys.Date()". Thank you for your help on this.