Ask Your Question
3

What is the syntax to convert a date into the format of YYYY-DD-MMTHH:MM:SS.sss in bash?

asked 2023-06-15 10:53:49 +0000

bukephalos gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2023-06-15 11:05:01 +0000

ladyg gravatar image

The syntax to convert a date into the format of YYYY-DD-MMTHH:MM:SS.sss in bash is:

date +%Y-%d-%mT%H:%M:%S.%3N

This will output the date and time in the required format: YYYY-DD-MMTHH:MM:SS.sss. Replace %3N with %6N for microseconds.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-06-15 10:53:49 +0000

Seen: 11 times

Last updated: Jun 15 '23