For example I can calculate the difference of these two dates by looking at them but i have no clue when it comes to calculating this in a program.
Dates: A is 201
201
an easy (not to talk about timezones) approach is to convert both dates (datetimes) to secounds since 1/1/1970. the build the difference and (tada) devide by 3600
mktime() should do the work, if I remeber correctly
HTH