How-to articles, tricks, and solutions about DATE

how to convert java string to Date object

To convert a string to a Date object in Java, you can use the parse() method of the SimpleDateFormat class.

How to convert java.util.Date to java.sql.Date?

To convert a java.util.Date object to a java.sql.Date object in Java, you can use the java.sql.Date constructor that takes a long value as an argument.

How to count days between two dates in PHP?

You can use the DateTime class in PHP to calculate the number of days between two dates.

How to determine day of week by passing specific date?

To determine the day of the week for a specific date in Java, you can use the get() method of the Calendar class.

How to display a date as iso 8601 format with PHP

You can use the date() function in PHP to display a date in ISO 8601 format.

How to Format a JavaScript Date

Read the tutorial and find out the methods and libraries used to format the JavaScript date. Find the method you think is best for you and get the codes.

How to Get a Timestamp in JavaScript

Almost all the developers come across the question: how to get a timestamp in JavaScript. This tutorial will help you find the most efficient methods to use.

How to get AM/PM from a datetime in PHP

To get the AM/PM value for a given date and time in PHP, you can use the date() function with the a format string.

How to get current timestamp in string format in Java? "yyyy.MM.dd.HH.mm.ss"

To get the current timestamp in string format in Java, you can use the SimpleDateFormat class and specify the desired format string.

How to Get the Client Timezone Offset in JavaScript

Read this tutorial and learn several useful methods that are used to detect the client timezone offset in JavaScript easily. Choose the best one for you.

How to Get the Current Date and Time in JavaScript

The tutorial provides information of getting the current date, time and both by running a simple piece of code. Also, get the full explanation of the code.

How to get the current time in YYYY-MM-DD HH:MI:Sec.Millisecond format in Java?

To get the current time in the YYYY-MM-DD HH:MI:Sec.Millisecond format in Java, you can use the SimpleDateFormat class and specify the desired format string:

How to Get the Current Year with PHP

On this page, you will get solutions to a common issue in PHP: how to get the current year.

How to get the last day of the month?

You can use the calendar.monthrange() function from the calendar module in Python to get the last day of a month.

How to get time difference in minutes in PHP

To get the time difference in minutes between two dates in PHP, you can use the DateTime class and the diff() method.

How to parse a date?

To parse a date in Java, you can use the SimpleDateFormat class.

How to print a date in a regular format?

In Python, you can use the datetime module to work with dates and times.

How to set time zone of a java.util.Date?

To set the time zone of a java.util.Date object in Java, you can use the Calendar class.

How to subtract a day from a date?

You can use the datetime module in Python to subtract a day from a date.

How to subtract X day from a Date object in Java?

To subtract a certain number of days from a Date object in Java, you can use the Calendar class.

Java 8: Difference between two LocalDateTime in multiple units

To find the difference between two LocalDateTime objects in multiple units, you can use the Duration class.

Java format yyyy-MM-dd'T'HH:mm:ss.SSSz to yyyy-mm-dd HH:mm:ss

To convert a date in the format yyyy-MM-dd'T'HH:mm:ss.SSSz to the format yyyy-mm-dd HH:mm:ss, you can use the SimpleDateFormat class in Java.

Java string to date conversion

To convert a string to a date in Java, you can use the parse method of the SimpleDateFormat class.

Java: Get month Integer from Date

To get the month integer from a java.util.Date object in Java, you can use the getMonth() method of the java.util.Calendar class.

java.util.Date format conversion yyyy-mm-dd to mm-dd-yyyy

To convert the format of a java.util.Date object from yyyy-MM-dd to MM-dd-yyyy, you can use the SimpleDateFormat class and its format() method.