User Tools

Site Tools


bash:date_time:parsing_date_and_time

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

bash:date_time:parsing_date_and_time [2021/01/26 16:18] – created peterbash:date_time:parsing_date_and_time [2021/01/26 16:18] (current) peter
Line 1: Line 1:
 ====== BASH - Date & Time - Parsing Date and Time ====== ====== BASH - Date & Time - Parsing Date and Time ======
 +
 +<code bash>
 +#!/bin/bash
 +year=`date +%Y`
 +month=`date +%m`
 +day=`date +%d`
 +hour=`date +%H`
 +minute=`date +%M`
 +second=`date +%S`
 +echo `date`
 +echo "Current Date is: $day-$month-$year"
 +echo "Current Time is: $hour:$minute:$second"
 +</code>
  
bash/date_time/parsing_date_and_time.1611677891.txt.gz · Last modified: 2021/01/26 16:18 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki