question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Help to convert timestamp to formatted time string

See original GitHub issue

Is there a way to specify something that like

new Instant(timestamp)

to convert timestamp(long) to a date string?

input: { “timestamp”: 1623960973468 }

output: { “timestamp”: “2021-06-17T20:16:13.468Z” }

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:11

github_iconTop GitHub Comments

1reaction
sudharnathcommented, Sep 4, 2021

@lucioalmeida Awesome, it works now. You saved me a lot of time.

Thank You 👍 😃

1reaction
lucioalmeidacommented, Sep 4, 2021

Sorry. My spec is wrong

[{
    "operation": "br.com.teste.jolt.CustomModifier$Overwritr",
    "spec": {
        "timestamp": "=timestampToDateString(@(1,timestamp), 'MM-dd-yyyy hh:mm:ss')"
    }
}]
Read more comments on GitHub >

github_iconTop Results From Across the Web

Format java.sql.Timestamp into a String - Stack Overflow
I know that doing it with a String is fairly simple e.g: String dateString = "2016-02-03 00:00:00.0"; Date ...
Read more >
Convert between String and Timestamp - Baeldung
Learn how to convert between String and Timestamp with a little help from LocalDateTime and Java 8.
Read more >
Java Timestamp toString() Method with Examples - Javatpoint
Java Timestamp toString() Method. The toString() method of Timestamp class converts the Timespan object in JDBC timestamp escape format.
Read more >
How to Format, Fix, and Convert Timestamps in Your Data ...
Timestamps can display as a formal datetime data type or as a string you must convert. Times can be referenced as UTC or...
Read more >
8.1: Data Type Formatting Functions - PostgreSQL
9.8. Data Type Formatting Functions ; to_timestamp (text, text), timestamp with time zone, convert string to time stamp ; to_timestamp (double precision) ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found