0 pts.
 Java DateTime – Extract substrings
Can anyone help me extract the Hour and the AM or PM as a string in a Java DateTime object in Java? I am using Domino 6.4 Thanks. George

Software/Hardware used:
ASKED: April 26, 2005  8:58 PM
UPDATED: June 2, 2011  3:18 PM

Answer Wiki:
Hi George, you could try using this: DateTime dt = session.createDateTime("Today"); String sCreatedDate = dt.getTimeOnly(); which will return the time as a string; if you have to you could then split this string into the Hour and AM/PM. The DateTime class in Domino also includes a toString and toJavaDate method you could use if it's appropriate for your solution. Regards Kjetil
Last Wiki Answer Submitted:  April 27, 2005  1:35 am  by  Kjetil   0 pts.
All Answer Wiki Contributors:  Kjetil   0 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _