Ritu Singh
Problem:
I have a "Date" column & "Time" column.
I want to create a new column "Tradedate" & depending on the following condition:
If "Time" = 23:00:00, then add one day to "Date" and return result in "Tradedate" column, otherwise return "Date" result in the "Tradedate" column
Why doesn't my function work? I instead get just the initial date as opposed to date +1 when time = 23:00:00
Solution:
Please simplify the code like below. I hope it works as u want.
Code:
Output:
Suggested blogs:
>How to route between different components in React.js?
>How to save python yaml and load a nested class?-Python
>How to send multiple HTML form fields to PHP arrays via Ajax?
>What is data binding in Angular?
>What is microservice architecture, and why is it better than monolithic architecture?
>What makes Python 'flow' with HTML nicely as compared to PHP?
>What to do when MQTT terminates an infinite loop while subscribing to a topic in Python?
>Creating custom required rule - Laravel validation