Q:

How to sum 2 hours to date column in csv file

I have csv file consist of 2 columns, name and date in 24 hours format 
Name, log_date

John, 11/29/2017 23:00

And i want to add 2 hours to log date to change date and time to be as below
John, 11/30/2017 01:00

I tried to add it by below command but with no success
awk - F 'NR>1{$4+=(2/24);}1' OFS="," IN.csv > OUT.csv

I get the below output
2017.08

in values of the log date column
So please help

A:

All you're looking for is documented here.
Using space as a field separator :
{
     split($2,D,"/")
     split($3,H,":")
     # format for mktime is "YYYY MM DD HH MM SS [DST]"
     d = D[3] " " D[1] " " D[2]" " H[1] " " H[2] " 00"
     t=mktime(d)
     t = t + 7200 # add two hours
     $2 = strftime("%m/%d/%Y",t)
     $3 = strftime("%H:%M",t)
}1

