Excel - Date Time Format ; If time is PM add a day -


in excel have data in date time format

for example: "11/10/2007 8:40:58 pm"

i trying extract date , if time pm, add day. if time am, date remains same.

so since time 8:40:58 pm want 12/10/2007.

is there way in excel such thing using formulas?

please consider using following formula. uses fact in excel in date-time code uses 1 represent full day , fractions represent time. if timestamp in a1 then:

=int(a1)+if((a1-int(a1))>=0.5,1,0) 

regards.


Comments