SiemensSEN
asked on
change the format of a date field in JAVA
How do I convert a date field [Jan 17, 2014 5:57:05 PM] to yyyy-mm-dd HH::MM::ss
--My Definition--
Date timestamp;
--get the value--
this.timestamp= (Date)sd.getFieldValue("ti mestamp");
Thanks for your help
--My Definition--
Date timestamp;
--get the value--
this.timestamp= (Date)sd.getFieldValue("ti
Thanks for your help
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I am reading the date information from SOLR database. The date field in define as a 'Date' type
ASKER
I am reading the date information from SOLR database. The date field in SOLR define as a 'Date' type and I need to return a variable of type date with format(yyyy-mm-dd HH:MM:SS)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Sorry ...
The value is I get from SOLR is of type DATE e.g Jan 17, 2014 5:57:05 PM
I would like to convert it to format (yyyy-mm-dd HH:MM:ss) and return this value as type 'Date'
Thanks for your help . I will try to debug with your suggession
The value is I get from SOLR is of type DATE e.g Jan 17, 2014 5:57:05 PM
I would like to convert it to format (yyyy-mm-dd HH:MM:ss) and return this value as type 'Date'
Thanks for your help . I will try to debug with your suggession
The value is I get from SOLR is of type DATEThis is the Java TA. Which Java type do you get?
ASKER
Java.util.Date
OK good. See my previous code example
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
:)