дата

Subtracting time

There are three times obtained from the database (Arrival time, Departure time, and breaks). I try to do this: $time1 = ... 7: 00 Shutdown time: 05: 33: 00 Breaks: 00: 07: 33 It should turn out 00: 38:27 and it turns out 20: 38: 27 What's wrong?

moment.js date output

Hello. I use the moment.js library. I'm trying to display the time difference in the desired format. And here I can not unde ... time difference in this format: YYYY-MM-DD HH:mm:ss. What you need to do to implement the date output in the desired format?

Converting String to Date

Can't convert String to Date Guided by this article, I managed to convert a date where days/months/years are passed in numb ... tln(formatter.format(date)); Issues: Exception in thread "main" java.text.ParseException: Unparseable date: "28-Nov-2015"

How to incline the word "day" by numbers?

There is a value of the difference between two dates in days. How to make formatting in this form: 1 day, 2 days, 3 days, 4 days, 5 days, 20 days, etc.? That is, what would change the words день and дня.

Calculate the number of days/hours/minutes/seconds between two dates

There is a variable containing System.currentTimeMillis () at the time of application startup You need to calculate how many ... ssed so far long time_up = System.currentTimeMillis(); ..... long difference = time_up - System.currentTimeMillis(); .... ?

How to subtract dates in Java?

StartDate: 2016-05-11 00:46; EndDate: 2016-05-12 12:26; the result should be: 1d 11h 40min

How to split 24 hours into 5 minutes in the form of 12: 00, 12: 05, 12: 10, etc.?

Friends, please help with the solution. How to decompose 24 hours in increments of 5 minutes in the form of 12: 00, 12: 05, 1 ... =mktime(0,0,0,$month,$i,$year); $date=date("d/m",$mktime); $dates_month[$i]=$date; echo $date } Help me redo it.

Converting milliseconds to a date

On the client, I get a date of this type: Sat May 05 2018 00:00:00 GMT+0300 (RTZ 2 (зима)) Next, I convert this date to m ... eTime(1970, 1, 1) + tiks //04.05.2018 21:00:00 How do I convert milliseconds correctly to get a UTC date without an offset?

Number of days from year zero to today

How can I find out the number of days that have passed from the "beginning of time" (0 year, 1 month, 1 day) to today?

SQL (postgresql) request to create a table with a date field (YYYY-MM-DD-HH)

Please tell me the command to create a table where there will be a field with a date and time of the type YYYY-MM-DD-HH. I do ... elds, the query will look like create table Test( 'id' int not null, 'date' ???? not null ); What to put in place "????" ?

How do I add 1 day to a date?

I am not a programmer, but I work on one site as an administrator. It was necessary to add 1 day to the date. It seems to me ... str($order->date,0,10); Can you tell me how to prescribe all this? Date format - datetime 2016-09-02 10:13:54 Thanks!

Calculate the difference between dates

There is a Mysql table with a "data" column with the datetime type. You need to take the current date and time and calculate ... nce SEC_TO_TIME works in the interval of 24 hours, unfortunately. Actually, the question is, how to write a query correctly?

Get the current android time and date

In the application, you need to display the date and time in two separate textviews. I have already tried everything I could ... ork by interfering. If someone has encountered similar problems or knows how to solve mine, I will be grateful for your help.

convert the string in the form "6 days ago" to a date

There are different lines: "1 day ago", "5 days ago", "3 month ago", etc. How can I convert them to a date like: 2019-04-03 In the pcp, there is date("Y-m-d", strtotime("3 days ago"))

WP change request for output of records for the last 30 days

Current request: $popular_posts = get_posts("cat=-104&orderby=comment_count"); It is necessary to withdraw for the las ... the query? So that the output is for the last 30 days in get_posts. That is, how to pass it through the parameter date_query