1)I have a string of this type of format: dd MMM yyyy.
2)I want to end up with a Timestamp of this format: yyyy-mm-dd hh:mm:ss
I've gone back and forth between string, date, formatter, timestamp and I keep getting exceptions of all kinds, can anyone post a code that would begin with and end with the above formats in those type of objects?
3. Convert that Date to a long value using a method whose name I think might be getTime().
4. Pass that long value to a Timestamp constructor.
By the way it doesn't make sense to require that a Timestamp should have any kind of format. It's just a time stamp, it doesn't have a format. If you need to produce a String representation of the Timestamp using some particular format then: