I am trying to change the type of a column in a dataset from Power Bi from Character to Date.
The results from str(WeekStartDate) is chr "2021-06-28T00:00:00.0000000"
I need to change the type of this dataset column to Date. I have tried:
dataset.WeekStartDate <- as.date(WeekStartDate)
and every other way I can find, but it either will not change, or if it does change the script give me a data.frame error, since it creates a new data.frame(WeekStartDate)
I could not find a way to upload a sample CVS file, so I will past a few rows below.
Line,WeekStartDate,Percentage
Line1,2021-06-28T00:00:00.0000000,17.5066313
Line1,2021-07-05T00:00:00.0000000,22.71062271
Line1,2021-07-12T00:00:00.0000000,44.24057085
Line1,2021-07-19T00:00:00.0000000,68.34817013
Line1,2021-07-26T00:00:00.0000000,61.95965418
Line1,2021-08-02T00:00:00.0000000,22.14983713
Line1,2021-08-09T00:00:00.0000000,28.43691149
Line2,2021-06-28T00:00:00.0000000,25.73633441
Line2,2021-07-05T00:00:00.0000000,32.07489451
Line2,2021-07-12T00:00:00.0000000,21.69795038
Line2,2021-07-19T00:00:00.0000000,40.61744966
Line2,2021-07-26T00:00:00.0000000,37.43225806
Line2,2021-08-02T00:00:00.0000000,37.1459695
Line2,2021-08-09T00:00:00.0000000,16.46602972