I have a set of html files which are generated as a output. The names of the html output files should be the timestamps. I am able to generate the date using the following code.
DT::SaveWidget(Output, paste0(Sys.date(), ".html"))
I want the time as well. But I get an error "Cannot create file, reason: 'Invalid argument'"
DT::SaveWidget(Output, paste0(Sys.time(), ".html"))
I also tried the following way:
now <- Sys.time()
DT :: SaveWidget(Output,paste0(now, "%Y%m%d_%H%M%S_"), ".html")
It is throwing the same error. Is there a way to append the time to the html output files. It is for a set of files in folder. So, it should be different for each file. Kindly suggest a way to do this.