Question

i want to convert the whole column from a factor to date.

The str of the dataset I am using is given below:

> str(dataset)
'data.frame':   2538 obs. of  5 variables:
 $ X        : int  1 2 3 4 5 6 7 8 9 10 ...
 $ SessionID: int  13307 21076 27813 8398 23118 12256 28799 11457 7542 19261 ...
 $ Timestamp: Factor w/ 2532 levels "2014-04-01T03:02:33.088Z",..: 2064 905 1086 1027 2419 1327 2035 1206 481 1354 ...
 $ ItemID   : int  214684513 214718203 214716928 214826900 214838180 214717318 214821307 214537967 214835775 214706432 ...
 $ Price    : int  0 0 0 0 0 0 0 0 0 0 ...

How can I convert timestamp variable from factor to specific date format:

YYYY-MM-DDThh:mm:ss.SSSZ (2014-04-06T18:42:05.823Z)

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with datascience.stackexchange
scroll top