Powered by Ajaxy
Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

Java: How to verify If a date is before another date

import java.util.Calendar;
import java.util.Date;
public class DateBefore 
{
  public static void main(String[] args)
  {
    Date today = new

Java: How to get the TimeZone.

import java.text.SimpleDateFormat;
import java.util.Date;
public class TimeZone
{
  public static void main(String[] args)
  {
    Date date =

Java: Format Date with MessageFormat class

import java.text.MessageFormat;
import java.util.Date;
public class DateFormating
 {
  public static void main(String[] argv) throws Exception {

Java: How to convert milliseconds value to date

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;
public class MillisecondeADate {
  public static void main

Time: How to include include AM or PM indicator.

import java.util.Calendar;
import java.util.Formatter;
public class AMPMIndicator
 {
  public static void main(String[] argv) throws Exception {

Java: How to Subtract year from current date

import java.util.Calendar;
public class SubstractYear
 {
  public static void main(String[] args) 
{
    Calendar current_date = Calendar.getInst

Java: How to use System.out.printf

public class PrintfMots {
  public static void main(String[] args) {
    String [] words = new String [] { "x", "sakoba", "abcdefghijklmnopqrstvuwxyz

Java: Group separators Example

public class GroupSeparator
 {
  public static void main(String[] argv) throws Exception {
    System.out.printf("group separators: %,.2f", 24152008.

Java: How to Show dates before 1970

import java.util.Calendar;
import java.util.GregorianCalendar;
public class AffichageDate {
  public static void main(String[] argv)
  {
    Ca

Java: How to Display Available Time Zones

import java.util.Arrays;
import java.util.TimeZone;
public class ListeFuseauxHoraires
{
    public static void main(String[] args) {
        St

Java: How to display current time

import java.util.Calendar;
public class CalendarHD {
  public static void main(String[] argv) throws Exception {
    Calendar cal = Calendar.getInsta

Java: Formatting a Message Containing a Number

import java.text.MessageFormat;
public class MsgFormatExample2 
{
  public static void main(String[] argv) throws Exception {
    Object[] params = n

Java: How to increment and Decrement Months

import java.util.Calendar;
public class DecrementationMois
{
  public static void main(String[] args)
  {
    Calendar cal = Calendar.getInstan

Java: How to display complete time and date using %T code format.

import java.util.Calendar;
import java.util.Formatter;
public class CompletDate {
  public static void main(String[] arg) throws Exception {
    Form

Java: How to Add hours, minutes or seconds to a date

import java.util.Calendar;
public class CalendarOperation
  {
    public static void main(String[] args) {
        Calendar current_date = Calen