How to convert 2019-08-15 date format to August 15, 2019 in the command line?Convert Date formate in unixConvert any Date format in unixconvert date format in logConvert a date formatchange date format and store in variable using awkHow to convert date format in fileDate change format in unixCan I convert a date in the format YYYYMMDDHHMM using date?convert the dates to a standard format
What is Soda Fountain Etiquette?
Stolen MacBook should I worry about my data?
A first "Hangman" game in Python
What is the name of this plot that has rows with two connected dots?
Can a DM change an item given by another DM?
How many petaflops does it take to land on the moon? What does Artemis need with an Aitken?
Federal Pacific 200a main panel problem with oversized 100a 2pole breaker
rationalizing sieges in a modern/near-future setting
Recommended Breathing Exercises to Play Woodwinds
Why is getting a PhD considered "financially irresponsible" by some people?
Commercial company wants me to list all prior "inventions", give up everything not listed
Will removing shelving screws from studs damage the studs?
Grep contents before a colon
Find most "academic" implementation of doubly linked list
Are strlen optimizations really needed in glibc?
Find feasible point in polynomial time in linear programming
74S vs 74LS ICs
Is a Centaur PC considered an animal when calculating carrying capacity for vehicles?
Dotted background on a flowchart
Is there an in-universe explanation given to the senior Imperial Navy Officers as to why Darth Vader serves Emperor Palpatine?
Is there any problem with a full installation on a USB drive?
Fantasy Macro Economics: What would Merfolk Trade?
Count the number of shortest paths to n
Why didn't Doc believe Marty was from the future?
How to convert 2019-08-15 date format to August 15, 2019 in the command line?
Convert Date formate in unixConvert any Date format in unixconvert date format in logConvert a date formatchange date format and store in variable using awkHow to convert date format in fileDate change format in unixCan I convert a date in the format YYYYMMDDHHMM using date?convert the dates to a standard format
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
Given a bash
variable with the value 2019-08-15
, is there some utility that can convert that date to the format August 15, 2019
?
command-line date
add a comment |
Given a bash
variable with the value 2019-08-15
, is there some utility that can convert that date to the format August 15, 2019
?
command-line date
1
Possible duplicate of Convert Date formate in unix
– muru
Aug 15 at 7:12
add a comment |
Given a bash
variable with the value 2019-08-15
, is there some utility that can convert that date to the format August 15, 2019
?
command-line date
Given a bash
variable with the value 2019-08-15
, is there some utility that can convert that date to the format August 15, 2019
?
command-line date
command-line date
edited Aug 15 at 7:07
Kusalananda♦
161k18 gold badges318 silver badges506 bronze badges
161k18 gold badges318 silver badges506 bronze badges
asked Aug 15 at 0:51
VillageVillage
2,1608 gold badges35 silver badges57 bronze badges
2,1608 gold badges35 silver badges57 bronze badges
1
Possible duplicate of Convert Date formate in unix
– muru
Aug 15 at 7:12
add a comment |
1
Possible duplicate of Convert Date formate in unix
– muru
Aug 15 at 7:12
1
1
Possible duplicate of Convert Date formate in unix
– muru
Aug 15 at 7:12
Possible duplicate of Convert Date formate in unix
– muru
Aug 15 at 7:12
add a comment |
2 Answers
2
active
oldest
votes
On Linux, or any system that uses GNU date
:
$ thedate=2019-08-15
$ date -d "$thedate" +'%B %e, %Y'
August 15, 2019
On macOS, OpenBSD and FreeBSD, where GNU date
is not available by default:
$ thedate=2019-08-15
$ date -j -f '%Y-%m-%d' "$thedate" +'%B %e, %Y'
August 15, 2019
The -j
option disables setting the system clock, and the format string used with -f
describes the input date format (should be a strptime(3)
format string describing the format used by your variable's value). Then follows the value of your variable and the format that you want your output to be in (should be a strftime(3)
format string).
NetBSD users may use something similar to the above but without the -f input_fmt
option, as their date
implementation uses parsedate(3)
. Note also the -d
option to specify the input date string:
$ thedate=2019-08-15
$ date -j -d "$thedate" +'%B %e, %Y'
August 15, 2019
See also the manual for date
on your system.
add a comment |
Assuming that you have access to GNU date
, something along
$ date --date="2019-08-15" "+%B %d, %Y"
August 15, 2019
Check the manpage of date (man date
).
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f535662%2fhow-to-convert-2019-08-15-date-format-to-august-15-2019-in-the-command-line%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
On Linux, or any system that uses GNU date
:
$ thedate=2019-08-15
$ date -d "$thedate" +'%B %e, %Y'
August 15, 2019
On macOS, OpenBSD and FreeBSD, where GNU date
is not available by default:
$ thedate=2019-08-15
$ date -j -f '%Y-%m-%d' "$thedate" +'%B %e, %Y'
August 15, 2019
The -j
option disables setting the system clock, and the format string used with -f
describes the input date format (should be a strptime(3)
format string describing the format used by your variable's value). Then follows the value of your variable and the format that you want your output to be in (should be a strftime(3)
format string).
NetBSD users may use something similar to the above but without the -f input_fmt
option, as their date
implementation uses parsedate(3)
. Note also the -d
option to specify the input date string:
$ thedate=2019-08-15
$ date -j -d "$thedate" +'%B %e, %Y'
August 15, 2019
See also the manual for date
on your system.
add a comment |
On Linux, or any system that uses GNU date
:
$ thedate=2019-08-15
$ date -d "$thedate" +'%B %e, %Y'
August 15, 2019
On macOS, OpenBSD and FreeBSD, where GNU date
is not available by default:
$ thedate=2019-08-15
$ date -j -f '%Y-%m-%d' "$thedate" +'%B %e, %Y'
August 15, 2019
The -j
option disables setting the system clock, and the format string used with -f
describes the input date format (should be a strptime(3)
format string describing the format used by your variable's value). Then follows the value of your variable and the format that you want your output to be in (should be a strftime(3)
format string).
NetBSD users may use something similar to the above but without the -f input_fmt
option, as their date
implementation uses parsedate(3)
. Note also the -d
option to specify the input date string:
$ thedate=2019-08-15
$ date -j -d "$thedate" +'%B %e, %Y'
August 15, 2019
See also the manual for date
on your system.
add a comment |
On Linux, or any system that uses GNU date
:
$ thedate=2019-08-15
$ date -d "$thedate" +'%B %e, %Y'
August 15, 2019
On macOS, OpenBSD and FreeBSD, where GNU date
is not available by default:
$ thedate=2019-08-15
$ date -j -f '%Y-%m-%d' "$thedate" +'%B %e, %Y'
August 15, 2019
The -j
option disables setting the system clock, and the format string used with -f
describes the input date format (should be a strptime(3)
format string describing the format used by your variable's value). Then follows the value of your variable and the format that you want your output to be in (should be a strftime(3)
format string).
NetBSD users may use something similar to the above but without the -f input_fmt
option, as their date
implementation uses parsedate(3)
. Note also the -d
option to specify the input date string:
$ thedate=2019-08-15
$ date -j -d "$thedate" +'%B %e, %Y'
August 15, 2019
See also the manual for date
on your system.
On Linux, or any system that uses GNU date
:
$ thedate=2019-08-15
$ date -d "$thedate" +'%B %e, %Y'
August 15, 2019
On macOS, OpenBSD and FreeBSD, where GNU date
is not available by default:
$ thedate=2019-08-15
$ date -j -f '%Y-%m-%d' "$thedate" +'%B %e, %Y'
August 15, 2019
The -j
option disables setting the system clock, and the format string used with -f
describes the input date format (should be a strptime(3)
format string describing the format used by your variable's value). Then follows the value of your variable and the format that you want your output to be in (should be a strftime(3)
format string).
NetBSD users may use something similar to the above but without the -f input_fmt
option, as their date
implementation uses parsedate(3)
. Note also the -d
option to specify the input date string:
$ thedate=2019-08-15
$ date -j -d "$thedate" +'%B %e, %Y'
August 15, 2019
See also the manual for date
on your system.
edited Aug 15 at 7:37
answered Aug 15 at 7:18
Kusalananda♦Kusalananda
161k18 gold badges318 silver badges506 bronze badges
161k18 gold badges318 silver badges506 bronze badges
add a comment |
add a comment |
Assuming that you have access to GNU date
, something along
$ date --date="2019-08-15" "+%B %d, %Y"
August 15, 2019
Check the manpage of date (man date
).
add a comment |
Assuming that you have access to GNU date
, something along
$ date --date="2019-08-15" "+%B %d, %Y"
August 15, 2019
Check the manpage of date (man date
).
add a comment |
Assuming that you have access to GNU date
, something along
$ date --date="2019-08-15" "+%B %d, %Y"
August 15, 2019
Check the manpage of date (man date
).
Assuming that you have access to GNU date
, something along
$ date --date="2019-08-15" "+%B %d, %Y"
August 15, 2019
Check the manpage of date (man date
).
edited Aug 15 at 7:06
Kusalananda♦
161k18 gold badges318 silver badges506 bronze badges
161k18 gold badges318 silver badges506 bronze badges
answered Aug 15 at 0:59
JankaJanka
3065 bronze badges
3065 bronze badges
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f535662%2fhow-to-convert-2019-08-15-date-format-to-august-15-2019-in-the-command-line%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Possible duplicate of Convert Date formate in unix
– muru
Aug 15 at 7:12