1 year ago

#270076

test-img

shnnens

How to convert LocalTime to RegularTimePeriod?

I am plotting a linechart with JFreeChart. X axis of the linechart should be time and I want to get this time as a string like "08:20:20,19". When I am trying to convert LocalTime to RegularTimePeriod, it does not let me to do that. Is there any way to convert LocalTime to Regular time period or is there any way to get time as a String? I use timeSeries because only timeSeries get regularTimePeriod. To explain the sitauation crystal clear here is a code :

SimpleDateFormat simpleDateFormat = new SimpleDateFormat("HH:mm:ss,SS", Locale.ENGLISH);
String a = "08:20:20,19";
LocalTime localTime = LocalTime.parse(a);
try{
t = new Millisecond(simpleDateFormat.parse(a));}
catch(ParseException e){
e.printStackTrace();
}

java

jfreechart

simpledateformat

localtime

0 Answers

Your Answer

Accepted video resources