V
V
Viktoria Smirnova2018-08-14 07:30:26
Java
Viktoria Smirnova, 2018-08-14 07:30:26

How to concatenate two Timestamps and add quote brackets?

Sorry for the lamer question, there are two Timestamps

Timestamp timestamp = 2018-08-14 15:30:00.0;
Timestamp timestamp1 =2018-08-14 15:45:00.0;

How to glue them together and add quotes and brackets [and ), and remain Timestamp, so that it is like this: That is, the essence is this - you need to sort in the tsrange field:
["2018-08-14 15:30:00","2018-08-14 15:45:00")
during
["2018-07-27 09:30:00","2018-07-27 10:30:00")
["2018-07-28 09:00:00","2018-07-28 16: 00:00")
["2018-08-08 09:00:00","2018-08-08 17:00:00")

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evgeny, 2018-08-14
@klim76

you will need:
1) String.format(...) + SimpleDataFormat
or
2) concat(...) + SimpleDataFormat
P.S. SimpleDataFormat - may or may not be needed, depending on how you already have the Timestamp

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question