I have a time field in the integer datatype in HHMM. I want to convert into Time format HH: MM and then I need to add and subtract 45 min from 2 different columns. Can someone help me with that?
So I want to subtract 45 mins from 15:40 pm so my new time should be 14:55 pm similarly, I need to add 45 minutes in 2035 so my new time should be 2120 pm
Update the 30 to 45 and -45.
DateTimeFormat(DateTimeAdd("2017-01-01 " +[DateTime_Out],45,"minutes"),'%H%M')
DateTimeFormat(DateTimeAdd("2017-01-01 " +[DateTime_Out],-45,"minutes"),'%H%M')
This logic worked. However, I can see some null fields when I am trying to convert string to DateTime format. See the attached. How to fix these?
Thank you so much for the help. It worked but I can see still NULL values in the depart Time column. See below
Is the Departure time a String? I had an issue where it picked them up as INT32 and i had to use the selection tool to change it to String for the DateTime tool to work.
I had to modify it a little bit but it did work. Thank you so much
It was an integer then I had to change to a string in order to finally update to time. However, someone else answered and solved my issue. Much appreciated!