2008-11-20

Add datetime in MySQL

Example: plus datetime 31 days;
  • update table_name set datetime_field = ADDDATE(datetime_field, 31);
Example: minus datetime 31 days;
  • update table_name set datetime_field = ADDDATE(datetime_field, -31);

2008-11-04

Calculate DPI for Monitor

Use this formula.
dpi = sqrt(resolutionWidth ^ 2 + resolutionHeight ^ 2) / inches