How to convert the String data type as PT1M to ISO 8601 Time Standard in Java?

eg: String date=" PT1M "; convert into ISO 861 time standard.

0

1 Answer

“PT1M” is a period of time (“one minute”), not a time in itself. It is already in ISO 8601 format. As such I'm not sure exactly what you are asking, but I think that you want:

final Period period = new Period("PT1M"); 
1