Results 1 to 5 of 5
  1. #1
    ashin is offline Member
    Join Date
    Nov 2008
    Posts
    71
    Rep Power
    0

    Question Date Picker in swt

    does anyone knows how to set a date picker or use it in swt? tnx.. :rolleyes:
    :cool:

  2. #2
    vogella is offline Member
    Join Date
    Aug 2009
    Location
    Heidelberg
    Posts
    47
    Rep Power
    0

    Default

    Try the following:

    Java Code:
    DateTime dateFrom = new DateTime(parent, SWT.BORDER | SWT.DATE | SWT.DROP_DOWN);
    dateFrom.setDate(2007, 0, 1);

  3. #3
    ashin is offline Member
    Join Date
    Nov 2008
    Posts
    71
    Rep Power
    0

    Default

    tnx vogella sorry for the late reply.. anyway, do you have any idea to get the current date?
    :cool:

  4. #4
    AndreB's Avatar
    AndreB is offline Senior Member
    Join Date
    Dec 2009
    Location
    Stuttgart, Germany
    Posts
    114
    Rep Power
    0

    Default

    Calendar.getInstance() should do the work

    Java Code:
    System.out.println(DateFormat.getInstance().format(Calendar.getInstance().getTime()));

  5. #5
    vogella is offline Member
    Join Date
    Aug 2009
    Location
    Heidelberg
    Posts
    47
    Rep Power
    0

Similar Threads

  1. java.util.Date vs java.sql.Date
    By Jack in forum New To Java
    Replies: 5
    Last Post: 10-28-2010, 02:59 PM
  2. Date
    By dj kourampies in forum New To Java
    Replies: 3
    Last Post: 02-22-2009, 11:53 AM
  3. Compare date input to database with current date
    By hungleon88 in forum Advanced Java
    Replies: 2
    Last Post: 11-25-2008, 08:10 AM
  4. Creating a Gregorian Calendar using a Date object gives date - 1
    By prachi_goliwadekar in forum New To Java
    Replies: 1
    Last Post: 05-08-2008, 08:32 PM
  5. Difference between current date and anothe date
    By vijay balusamy in forum New To Java
    Replies: 1
    Last Post: 04-16-2008, 04:15 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •