It’s not clear if you want to format a DateTimeType with only specific fields or if you want to access those fields in code. If you are asking for the latter, here’s a simple rule that works for that purpose.
import org.openhab.core.library.types.DateTimeType
import java.util.Calendar
rule "date test"
when
System started
then
var ts = TestTimestamp.state as DateTimeType
logInfo("TEST", "Timestamp={}", ts)
var cal = ts.getCalendar()
logInfo("TEST", "Hour={}", cal.get(Calendar::HOUR_OF_DAY))
logInfo("TEST", "Minute={}", cal.get(Calendar::MINUTE))
logInfo("TEST", "Second={}", cal.get(Calendar::SECOND))
The easiest ways to discover the fields and methods available on a type is to use Designer, type in the name of a variable of that type and press <ctrl><space>. This will bring up a list of valid ways to complete the statement.