It is convenient to use timestamp to record datetime, but sometimes it is not necessary to display the milliseconds after the decimal point, so you need to redefine the format when converting to string. timestamp converted to string:
One, string and Date (java.util.Date) interchange
1.1 String-> Date
String datestr = "//::";
Date date = new Date ();
Note format must match the format of date string
dateformat sdf = new SimpleDateFormat ("Yyyy/mm/dd
Difference between oracle date and timestamp, oracletimestamp1. DATE data type
We are very familiar with this data type. We will always think of the date type when we need to represent the date and time. It can store months, years, days, centuries,
Date converted to timestampPHP provides functions that can easily convert various forms of a date to a timestamp, which is mainly:
Strtotime (): Resolves the datetime description of any English text to a timestamp.
Mktime (): Gets the
Time (converted from timestamp to timestamp)
Public class Date_U {/*** drop this method and enter the time to be converted, for example, ("June 14, 2014 seconds ") return timestamp ** @ param time * @ return */public String data (String time)
In today's work, learned the following points of knowledge:The difference between date and timestampThe date type is an Oracle-commonly used datetime variable, and his time interval is seconds. Two date type subtraction is a two-time interval,
This article mainly introduces the PHP date to time stamp, the specified date to convert to timestamp, has a certain reference value, now share to everyone, the need for friends can refer to
UNIX timestamp and format date is the two time
The UNIX timestamp and the formatting date are two time representation forms that we often deal with. The Unix timestamp is easy to store and process, but not intuitive, and the formatting date is intuitive, however, it is not as easy to process as
Php date to timestamp, specifying date to timestamp. Programmers who have written PHP + MySQL know that there is a time difference. UNIX timestamps and formatting dates are two forms of time representation that we often deal with. Unix timestamps
The UNIX timestamp and the formatting date are two time representation forms that we often deal with. The Unix timestamp is easy to store and process, but not intuitive, and the formatting date is intuitive, however, it is not as easy to process as
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.