views:

163

answers:

1

I am developing an Android application and require some basic datetime manipulation. I have a Date object (from Java.util.Date) holding a specific date. I need to add a specific time to it. The time I have is a string in this format: "9:00 PM EST"

How would I "add" this time to the previous date? If the Date object currently has: "4/24/10 00:00:00"

How would I change it to instead be: "4/24/10 09:00:00 EST"

I would prefer to do this without the use of an external library, if possible.

+1  A: 

Use SimpleDateFormat with format as "K:mm a vvv". The parse function will return you the date object.

Karan