Results 1 to 2 of 2
  1. #1
    valery is offline Member
    Join Date
    Jul 2007
    Posts
    32
    Rep Power
    0

    Default how to get the current date and time

    I want to get the current date and time of US and Canada. Since the current locale is Canada, I can get the current date of Canada. Is it possible to get US date and time through some logic? Or the current Canada time has to be converted to US?
    Please help me.

  2. #2
    hardwired's Avatar
    hardwired is offline Senior Member
    Join Date
    Jul 2007
    Posts
    1,576
    Rep Power
    8

    Default

    Is it possible to get US date and time
    See the TimeZone class. Calendar has a setTimeZone method.

Similar Threads

  1. 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
  2. Inserting current date into a DB table
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 02-15-2008, 08:38 AM
  3. Getting current date using dual (Oracle)
    By Java Tip in forum Java Tip
    Replies: 1
    Last Post: 02-13-2008, 04:46 PM
  4. Date/Time Servlet
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 01-14-2008, 09:34 AM
  5. Time and Date in Java
    By java_fun2007 in forum New To Java
    Replies: 4
    Last Post: 11-06-2007, 07:25 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
  •