Date: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
Line 7: Line 7:
=Overview=
=Overview=


{{{
<pre>
date +'%m/%d/%y %H:%M:%S'
</pre>


      date +'%m/%d/%y %H:%M:%S'
Output:


}}}
<pre>
03/07/11 16:07:17
</pre>


Output
=AM/PM=


{{{
<pre>
   
date +'%m/%d/%y %I:%M:%S %p'
      03/07/11 16:07:17
</pre>


}}}
=Year=
 
!!!AM/PM
 
{{{
 
      date +'%m/%d/%y %I:%M:%S %p'
 
}}}
 
!!!Year


Short year (14) %y
Short year (14) %y
Line 35: Line 29:
Long year (2014) %Y
Long year (2014) %Y


!!!File Name Format
=File Name Format=
 
{{{
      date +'%y.%m.%d-%H.%M.%S'
}}}
 


!!!Setting date & time
<pre>
date +'%y.%m.%d-%H.%M.%S'
</pre>


{{{
=Setting Date and Time=


    date 08311650
<pre>
}}}
date 08311650
</pre>


sets the date for 08/31 current year, time 16:50.
sets the date for 08/31 current year, time 16:50.


 
=Elapsed Time in Seconds=
!!!Elapsed Time in Seconds


Also see [expr]
Also see [expr]

Revision as of 06:14, 10 January 2016

External

Internal

Overview

date +'%m/%d/%y %H:%M:%S'

Output:

03/07/11 16:07:17

AM/PM

date +'%m/%d/%y %I:%M:%S %p'

Year

Short year (14) %y

Long year (2014) %Y

File Name Format

date +'%y.%m.%d-%H.%M.%S'

Setting Date and Time

date 08311650

sets the date for 08/31 current year, time 16:50.

Elapsed Time in Seconds

Also see [expr]

__Referenced by:__\\ [{INSERT com.ecyrd.jspwiki.plugin.ReferringPagesPlugin WHERE max=20, maxwidth=50}]