Switched to Postgres, and some things easily done in MySQL does not work as easily done in PostgreSQL.
Here there are two fields with datetime (timestamp without gmt) - start date and end. Need to get a percentage how much is left came to the end date of the current time. In MySQL it is possible to do this query:
select ((end_date - now()) * 100) / (end_date - begin_date) from table
The result will be how many percent is completed.
And Postgres how to do it?