473,414 Members | 1,686 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

Previous date in UNIX

Hi All,

Could someone pls let me know how to get preiousday for the current date.

Y i require this because i my script runs it will genate reports and sent them via mail, and in subject to include date.

And the problem is when these reports failed if we run these reports next day the subect line will current day actually we are ruuning reports for previous day.

Could some one pls help me out from this...

Cheers
harsha
Jun 18 '09 #1
2 10206
ashitpro
542 Expert 512MB
@harshakusam
This is I got when I run few commands...
$date
Thu Jun 18 07:04:38 EDT 2009

$date -d "-1 day"
Wed Jun 17 07:04:46 EDT 2009

This should help you
Jun 18 '09 #2
This is how you get previous date.. :---)

newprd$ echo `date`
Tuesday, 7 July 2009 15:30:19 BST
newprd$ echo `TZ=CST+24 date +%d/%m/%y`
06/07/09
Jul 7 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: techie | last post by:
I am using the following to delete the contents of a cookie Response.Cookies("maincookie").expires = DateAdd("d",-2,now) Response.redirect "login.asp" If i try to alert the value of the cookie...
6
by: Mark | last post by:
I'm looking for how to set up a query to return the record with the previous date to the most recent date. Example: ReturnDate: 11/15/03 12/12/03 2/4/04 4/5/04 The most recent date is...
2
by: Amanda | last post by:
This is hotel reservation when a departure date is changed manually by user input ( to a valid date in date format - validity is checkedsomewhere else), the arrival date is set to the previous date...
0
by: oracle_corrgi | last post by:
hi i have stored the date data in varchar2(30) in column name expected_date order_date in proj table 1. i want to get the nearest date of current (next) for expected_date 2. i want to get the...
2
by: favor08 | last post by:
7/19/2007 12:46:30 am. is in a field called CmplteDte. It is a date stamp of when the user completed the item. I need the time for a report but for a form that the supervisors use to QA the previous...
2
by: sudhaMurugesan | last post by:
Hi, I need to find the previous date from a given date in java script. Is there any code for it.Can anyone tell me.Thanks in advance
2
by: DThreadgill | last post by:
Not sure how to begin with this one. My table consists of: Branch# (number, double) EntryDate (datetime, mm/dd/yyyy hh:mm:ss am/pm) One branch can have many entry dates (i.e, Branch # 76...
2
by: Alex T | last post by:
If you have the current date, how do you get the date 1 day or 2 days or 100 days back?
4
by: Tom Travell | last post by:
Hi I have a database which records students and their test scores. Each student could have between two and ten tests. The test are in one table and the students in another. I want to create a...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.