File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes using Date from/to String Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "using Date from/to String" Watch "using Date from/to String" New topic

using Date from/to String

netanel weinberg

Joined: May 10, 2004
Posts: 27
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,
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24183

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

Joined: Feb 26, 2001
Posts: 4446

Check out the examples in the Java Almanac

Junilu - [How to Ask Questions] [How to Answer Questions]
It is sorta covered in the JavaRanch Style Guide.
subject: using Date from/to String
Similar Threads
Date serialization and timezones
TimeZone, calendar
convert date object in any time zone to GMT or remove time zone
timezone woes