Two Laptop Bag
The moose likes Beginning Java and the fly likes using Date from/to String Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "using Date from/to String" Watch "using Date from/to String" New topic
Author

using Date from/to String

netanel weinberg
Greenhorn

Joined: May 10, 2004
Posts: 27
Hello,
i'm trying to get an input from my web application of time and date as Strings and connect them to one Date object and the reverse action form the DB as Date object to two Strings of date and time and i don't understand clearly how to do it in a specific format and if i can translate the time in one zone to another zone just by changing the zone and if it can do how can i do it...

10x ahead,
netanel
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24054
    
  13

Please don't post the same question in multiple forums. I did you the courtesy of deleting the extra copy in the Intermediate forum.


[Jess in Action][AskingGoodQuestions]
Blake Minghelli
Ranch Hand

Joined: Sep 13, 2002
Posts: 331
The java.util.Calendar and java.text.SimpleDateFormat classes have methods for changing the time zone and formatting/parsing dates. Have you looked at those?


Blake Minghelli<br />SCWCD<br /> <br />"I'd put a quote here but I'm a non-conformist"
Junilu Lacar
Bartender

Joined: Feb 26, 2001
Posts: 4118
    
    2

Check out the examples in the Java Almanac


Junilu - [How to Ask Questions] [How to Answer Questions] [MiH]
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: using Date from/to String
 
Similar Threads
TimeZone, calendar
GMT to EDT
timezone woes
Date serialization and timezones
convert date object in any time zone to GMT or remove time zone