Good morning everyone,
I would kindly ask for help on two related matters.
First, I have a date variable that looks like this: 2021-08-27 14:31:47. I'd like to split it in date (2021-08-27) and time (14:31:47), basically creating two separate variables.
Second, I have a separate dataset with values associated with each date, and I would like to match them by Date. Below a summary of my two dataset and what I'd like to obtain after matching by Date. I'd like to bring the values of Dataset B into a new variable in Dataset A.
Thank you in advance,
Cristiano
Dataset A
Date
2021-08-27
2021-08-27
2021-08-27
2021-08-28
2021-08-29
2021-08-30
Dataset B
Date Value to match
2021-08-27 100
2021-08-28 110
2021-08-29 115
2021-08-30 95
Match (desired)
Date Value
2021-08-27 100
2021-08-27 100
2021-08-27 100
2021-08-28 110
2021-08-29 115
2021-08-30 95
I would kindly ask for help on two related matters.
First, I have a date variable that looks like this: 2021-08-27 14:31:47. I'd like to split it in date (2021-08-27) and time (14:31:47), basically creating two separate variables.
Second, I have a separate dataset with values associated with each date, and I would like to match them by Date. Below a summary of my two dataset and what I'd like to obtain after matching by Date. I'd like to bring the values of Dataset B into a new variable in Dataset A.
Thank you in advance,
Cristiano
Dataset A
Date
2021-08-27
2021-08-27
2021-08-27
2021-08-28
2021-08-29
2021-08-30
Dataset B
Date Value to match
2021-08-27 100
2021-08-28 110
2021-08-29 115
2021-08-30 95
Match (desired)
Date Value
2021-08-27 100
2021-08-27 100
2021-08-27 100
2021-08-28 110
2021-08-29 115
2021-08-30 95
Comment