Sponsored Content
Top Forums UNIX for Dummies Questions & Answers get yesterday date in yyyymmdd format Post 11957 by Smurtzy on Friday 14th of December 2001 02:32:21 PM
Old 12-14-2001
YESTERDAY=`TZ=aaa24 date +%Y%m%d`

This will give you yesterdays date in the format you are requesting.
This User Gave Thanks to Smurtzy For This Post:
 

10 More Discussions You Might Find Interesting

1. HP-UX

How can i get the yesterday's date in YYYYMMDD format

How can i get the yesterday's date in YYYYMMDD format??? (4 Replies)
Discussion started by: prasadsr
4 Replies

2. Shell Programming and Scripting

get yesterday in yyyymmdd format

how can i get yesterday in yyyymmdd format? :confused: (13 Replies)
Discussion started by: aaron_fong
13 Replies

3. UNIX for Dummies Questions & Answers

Format date from MM/DD/YYYY to YYYYMMDD

I have a file with some date columns in MM/DD/YYYY format: SMPBR|DUP-DO NOT USE|NEW YORK||16105|BA5270715|6/6/2007 |MWERNER|109||||JOHN||SMITH|MD|72211118||||||74559|21 WILMINGTON RD||D|11/6/2003|SL# MD CONTACT-LIZ RICHARDS|||0|Y|N||1411458| And I want to convert the date format to: ... (5 Replies)
Discussion started by: ChicagoBlues
5 Replies

4. Shell Programming and Scripting

convert date format YYYYMMDD to MM/DD/YYYY

In my shell script i have a variable which stores date in the format of YYYYMMDD. Is there any way to format this value to MM/DD/YYYY. Thanks. (8 Replies)
Discussion started by: nasirgondal
8 Replies

5. Shell Programming and Scripting

Change the date format from mmddyyyy to yyyymmdd

How do I change the date format from mmddyyyy to yyyymmdd in PERL. Can any one help me please. (3 Replies)
Discussion started by: thankful123
3 Replies

6. Solaris

Date after 5 dates in YYYYMMDD format

Hi Experts, How to get date 5 days after current date in YYYYMMDD format? How do we compare date in YYYYMMDD format? Thanks (1 Reply)
Discussion started by: needyourhelp10
1 Replies

7. Shell Programming and Scripting

Date after 5 days from current date in YYYYMMDD format

Hello Experts, How do i get date after 5 days from current date in YYYYMMDD format? How do you compare date in YYYYMMDD format? Thanks (8 Replies)
Discussion started by: needyourhelp10
8 Replies

8. Shell Programming and Scripting

Validating date in yyyymmdd format using PERL

Hi all, i had a code where in user will enter a date in yyyymmdd format.. i didnt use any validation for the date and now the problem is if a user enters date instead of month after year it is proceeding with the code.. like if the date is 20120426 and if the user enters 20122604 it... (4 Replies)
Discussion started by: smarty86
4 Replies

9. Shell Programming and Scripting

Date format to be changed from DDMMYYYY to YYYYMMDD

My requirement is:- there will be files at a location each day with the date format DDMMYYYY. Novawise_Activity_Call_Notes_04022013.txt Novawise_Activity_Inbound_04022013.txt Novawise_Activity_Inbound_05022013.txt Novawise_Activity_Call_Notes_05022013.txt... (8 Replies)
Discussion started by: djrulz123
8 Replies

10. Solaris

Convert string (YYYYMMDD) format to date in Sun OS

Hi All I need help in converting a string of YYYYMMDD format to date in Sun OS and then find out if the day is a Wednesday or not. The "date -d" option is not working and your help is much appreciated. The date command usage from the operating system we use here is as follows: Thanks, SK (11 Replies)
Discussion started by: SK123
11 Replies
IDATE(1)							   User Commands							  IDATE(1)

NAME
idate - A Gregorian/Meladi to/from Hijri/Islamic date converter SYNOPSIS
idate [--gregorian yyyymmdd] [--hijri yyyymmdd] [--simple] [--umm_alqura] [--help] DESCRIPTION
The idate program is a Gregorian to Hijri (and vice-versa) date converter. The application uses and offers multiple calculation methods with not all of them agreeing at all times. The reason for this multiplicity is due to not having one agreed upon method and so various entities develop and advocate their calculations. idate is able to comprehend and calculate both pre-epoch or pre-Hijrah, denoted as "B.H", as well as post-epoch or post-Hijrah, denoted as "A.H", dates. idate also utilizes Gregorian's pre-epoch "B.C" and post-epoch "A.D" dates and notes them per its output. When entering pre-epoch years, negative numbers ought to be utilized. idate when run without any command-line options uses the host machine's current Gregorian date and converts it to Hijri. OPTIONS
idate follows the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of all options is noted below: -h, --help Show summary of options -g, --gregorian yyyymmdd Specify the Gregorian date to be converted where 'y' stands for year, 'm' for month and 'd' for day -hi, --hijri yyyymmdd Specify the Hijri date to be converted where 'y' stands for year, 'm' for month and 'd' for day -s, --simple Specify a simplified output mode -u, --umm_alqura Specify to use the Umm Al-Qura calculation method (used mostly in Saudi Arabia) BACKGROUND
The Hijri calendar is used in most of the Arab world and is the symbolic calendar of the Islamic faithed worldwide. This calendar is known as the "Hijri" (based on the word "Hijrah" - denoting migration in Arabic) to signal Prophet Mohammed's (PBUH) migration from Makkah to Medinah on Thursday, July 15, 622 AD (Julian) or July 19, 622 AD (Gregorian). The Islamic Hijri calendar is strictly lunar (ie. moon-based) with twelve lunar months which do not correspond or track their solar coun- terparts (the Gregorian calendar is a solar or sun-based calendar). Lunar years and thus Hijri years are, on average, about 354 days long resulting in a Hijri year being roughly about 11 days shorter than its Gregorian counterpart. There is much discussion and confusion regarding how best to track the Hijri calendar. A great deal of that confusion is based on the fact that many rely on a human moon sighting to denote the start (or end) of a month (each month of the Hijri calendar starts when a new moon's crescent is observed or is made visible at sunset) as opposed to using an empirical mathematic certainty. The methods presented in this application and its underlying ITL library are strictly arithmetic in nature and do NOT take moon-phases into consideration (in short, observational approximation is not used). LIMITATIONS
The Umm Al-Qura option doesn't function with pre-epoch settings. REPORTING BUGS
Report bugs on the web using http://bugs.arabeyes.org AUTHOR
Written by Nadim Shaikli as part of the Arabeyes.org project. COPYRIGHT
idate is subject to the GNU General Public License (GPL). Copyright (C) 2005, Arabeyes, Nadim Shaikli. SEE ALSO
The ITL library (libitl) from the Islamic Tools and Libraries project. It is the underlying requirement for idate to function. The ITL library was created and is hosted at www.arabeyes.org. idate January 05, 2005 IDATE(1)
All times are GMT -4. The time now is 08:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy