Linux Operating System (MOSC)

MOSC Banner

Fetching date in the format DD-MON-YYYY_HH24:MI:SS

edited Jun 6, 2019 5:00AM in Linux Operating System (MOSC) 2 commentsAnswered

Hi,

In Linux, if I need to fetch current date in the format DD-MON-YYYY_HH24:MI:SS, what needs to be the command?

Current Date - 29-MAY-2019

I executed the following command:

date +%d-%^b-%Y

It fetches the date 29-MAY-2019

I also want the timestamp to be connected. For.e.g it is 10:15:22 PM, it needs to be displayed as 29-MAY-2019_22:15:22

Please let me know how do I fetch the same.

Thanks,

Krishna

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center