Added method, that return date in properly format for sql query