rbtl-fs24 / project-fabienne-moana

This project report was prepared for the data science for openwashdata course.
https://rbtl-fs24.github.io/project-fabienne-moana/
0 stars 0 forks source link

How to extract time from date-time format #2

Closed fabienne-moana closed 3 months ago

fabienne-moana commented 3 months ago

Hi @larnsce @bonschorno

I hope you're doing well!

In my google sheet I have a column with the time when the waste was collected (eg. 8:20). When I imported it to github it automatically added a date. Is it possible to extract the time? - because I have the date as a seperate variable. Or should I just make one variable with date and time? I searched online for help but I didn't find anything I could use.

Best regards Fabienne

Bildschirm­foto 2024-06-03 um 10 20 06
larnsce commented 3 months ago

Thanks for your questions, @fabienne-moana.

There is not time class for data, like there is a date class. Time is always also connected to a date and will be a dttm (date time) class. You can extract hours, minutes, seconds from that, but it will then be a numeric type vector.

I see you have closed the issue. Does that mean you could find a solution yourself?

fabienne-moana commented 3 months ago

Thank you for your reply! Yes, I closed the issue because I have found a solution:)