public static String GetTime (date date) { StringBuffer time = new StringBuffer (); Date Date2 = new Date (); Long temp = Date2.gettime ()-date.gettime (); Long days = TEMP/1000/3600/24; Hours of difference if (days>0) { Time.append (days+ "Day"); } Long Temp1 = temp% (1000 * 3600*24); Long hours = temp1/1000/3600;
Recently in the project, you need to turn back the background time into a few seconds ago, a few ago, a few hours ago, a few days ago and other formats; the time format returned in the background is: 2015-07-30 09:36:10, you need to compare the current time with the return time, and finally show a few seconds ago, a few ago, A few hours ago, a few days before the form.1. Because the returned time is a strin
? Phpechodate (Y-m-dH: I: s); current time? The difference between the time obtained by this method and the standard time is 8 hours. From php5.1.0, php. date is added to ini. the timezone option is disabled by default, that is, the displayed time (no matter what php Command is used) is the difference between the Greenwich Mean Time and our time (Beijing time ).
? Php echo date (Y-m-d H: I: s); // current time? The difference between the time obtained
When 24 hours later than php when there were too many when there were 24 php. Every 24 hours, too many php scripts, too many others, 24php [zookeeper] zookeeper was announced during the 24 hours when there were several major php attacks during the upgrade. please wait until 24 minutes until your php website has been updated, 24php
[Zookeeper]
Please wait u
IIS requires folder permissions. The website contains hundreds of thousands of files. The permission change was slow and failed in a few hours. Is there a good way? IIS nbsp; to obtain the folder permission. The website contains hundreds of thousands of files. The permission change was slow and failed in a few hours. Is there a good way? IIS requires folder permissions. The website contains hundreds of tho
Trading hours You can start trading daily 9:15 hours, 11:30-13:00 for noon break, 13:00 to start, and 15:00 trading ends. The specific trading hours are: The Shenzhen-Shanghai Stock exchange market is traded every Monday to Friday. Continuous auction time from 9:30 to 11:30 Afternoon for the future from 13:00 to 15:00 for continuous bidding time Closed: Sa
Source: http://www.crazyphper.com
/**
* Change the date format to a different display style according to the following rules
* Less than 1 minutes shows how many seconds ago
* Less than 1 hours, show how many minutes ago
* Within a day, show how many hours ago
* Within 3 days, show the day before yesterday 22:23 or yesterday: 12:23.
* More than 3 days, the full date
The date format of php processing is seconds ago, minutes ago, hours ago, yesterday, and the day before yesterday. *** modify the date format to different display styles according to the following rules * The number of seconds before Display is less than 1 minute * Less than 1 hour, how many minutes ago * one day, how many hours ago * 3 days ago, display the day before yesterday or yesterday: 12: 23. * If i
the value to another timespan value.Days: returns the timespan value calculated by the number of days.Duration: gets the absolute value of timespan.Hours: returns the hourly timespan value.Milliseconds: returns the timespan value in milliseconds.Minutes: returns the timespan value calculated in minutes.Negate: returns the opposite number of the current instance.Seconds: returns the timespan value calculated in seconds.Subtract: Subtract another timespan value from it.Ticks: the number of tick v
Computer radiation-people who use computers for 4-6 hours a day must see the current college students. Source: Wang xinxin's log
Computer radiation-users who use computers for 4-6 hours a day must watch
4-6 hours a day for a computer
* Remember to turn off the computer when you go to bed at noon.
Do you often think of a strong head or a poor memory?
When you sl
In the 24 hours of a day, how many times does the hour, minute, and second hands of the clock overlap? What is the time? How did you calculate it?
Only twice.Assuming that the hourly rate is ω (ω = 2 π/12 hours = π/6 hours), the sub-needle's angular velocity is 12 ω (12 ω = 2 π/60 minutes ), the second-hand angular velocity is 72 ω (72 ω = 2 π/60 seconds ).A
Js implementation time shows a collection of methods several days ago, several hours ago, or a few minutes ago, js a few days ago
Here we summarize common methods for displaying the js implementation time several days ago, several hours ago, or several minutes ago. Share it with you for your reference. The details are as follows:
Method 1:
My personal practice is to save the timestamp and then use the jq pl
Oracle 11g RAC remote database login time and OS time difference 16 hours solution
Help colleagues install the RAC database of Oracle 11.2.0.4 for project stress testing. The operating system is red flag server 3.
Today, my colleague suddenly called to say that the database time is 16 hours different from the OS time. The problem is that the two nodes log on locally and check that the sysdate and OS time ar
1. Problem Description
2. Solution
====================================== Lili's line ========
1. Problem Description
The project is deployed on the server and runs properly. However, after waking up the next day, Tomcat is automatically disabled. Check the Tomcat log and find that the Tomcat server is closed after more than eight hours...
I searched the internet for the root cause, which is basically the same answer. MySQL automatical
XP eXtreme Programming has four values, five principles, and 13 Best Practices. One of the best practices is that working 40 hours a week makes developers most happy, A best practice opposed by managers.
Overtime and overtime have long been common for developers and are also the most common strategy for managers. Overtime seems to be a potential rule in the IT industry, even if companies do not explicitly say that, it will also become the default ru
In C #, two timespans are subtracted to get a timespan instance. timespan has some attributes: days, totaldays, hours, totalhours, minutes, totalminutes, seconds, totalseconds, and ticks. Do not use totalticks.
These attribute names are difficult to understand, but after reading this article, you must start to understand them.
Example
The time 1 is 8:43:35;
The time is 8:43:34.
Use Time 2 minus time 1 to get a timespan instance.
Then the time 2 is
In C # two time subtraction, get a TimeSpan instance, TimeSpan Some attributes: Days, Totaldays, Hours, Totalhours, Minutes, Totalminutes, Seconds, TotalSeconds, Ticks, note that there is no totalticks.
These attribute names begin to understand some difficulties, but after reading this article, you must be enlightened.
For example, Time 1 is 2010-1-2 8:43:35, time 2 is 2010-1-12 8:43:34.
With time 2 minus time 1, get a TimeSpan instance.
Then 2 times
Add the Settings node Connectionlifetime (in seconds) to the connection string. Exceeding the set connection session will be killed!
Connection Lifetime, connectionlifetime
0
When a connection was returned to the pool, its creation time was compared with the current time, and the connection was dest royed If, time span (in seconds) exceeds the value specified by Connection Lifetime. This was useful in clustered configurations to force load balancing between a running se
Obtain how many hours are different between two time periods, or modify the number of days, hours, minutes, and seconds... None
Obtain how many hours are different between two time periods, or modify the number of days, hours, minutes, and seconds... None
Obtain how many hours
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.