Skip to content

Commit 8101e16

Browse files
add formatDateTime method (removed from RunnerPanel)
1 parent 77a5a28 commit 8101e16

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

sqldev/src/main/java/org/utplsql/sqldev/model/StringTools.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,16 @@ public static String replaceTabsWithSpaces(final CharSequence input, int indentS
6262
final String spaces = StringTools.repeat(" ", indentSpaces);
6363
return input.toString().replace("\t", spaces);
6464
}
65+
66+
public static String formatDateTime(final String dateTime) {
67+
if (dateTime == null) {
68+
return null;
69+
} else {
70+
if (dateTime.length() == 26) {
71+
return dateTime.replace("T", " ").substring(0, 23);
72+
} else {
73+
return dateTime;
74+
}
75+
}
76+
}
6577
}

0 commit comments

Comments
 (0)