09-23-2009
no no... actually it should give ... whether it is monday or tuesday or wed......
suppose if I give, 23-09-2008, it should give tuesday...
For Linux I am using the following :
CHKDT=`date -d $LIMGDT +%a`
however hp unix it is not working....
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi ,
I am relatively new to unix...
Can u pls help me out to find out if the first day of the month is a working day ie from (Monday to Friday)...using Date and If clause in Korn shell..
This is very urgent.
Thanks for ur help... (7 Replies)
Discussion started by: phani
7 Replies
2. Shell Programming and Scripting
How to find the first day of previous month in unix mmddyyyy format?
example : today is 07052007 (in mmddyyyy)
output sud be 06012007
thanks
mohapatra (10 Replies)
Discussion started by: mohapatra
10 Replies
3. UNIX for Dummies Questions & Answers
How to find the Day of the Week of the given Date using perl?
If I have a date in YYY--MM-DD format, how to find the DOW? Based on that, I need to find the following sunday.
Pls help. (5 Replies)
Discussion started by: deepakwins
5 Replies
4. Shell Programming and Scripting
Hi,
Is there any function in Unix by which v can find the exact day of any given date. Like i need to get Wednesday if i give 05 07 2008 (format MM DD YYYY)
Thanks,
RRVARMA (5 Replies)
Discussion started by: RRVARMA
5 Replies
5. Shell Programming and Scripting
Hi All,
I need to find the previous month last day minus one day, using shell script. Can you guys help me to do this.
My Requirment is as below:
Input for me will be 2000909(YYYYMM)
I need the previous months last day minus 1 day timestamp. That is i need 2000908 months last day minus ... (3 Replies)
Discussion started by: girish.raos
3 Replies
6. Shell Programming and Scripting
Hi guys,
I had a scenario...
1. I had to get the previous days date in yyyymmdd format
2. i had to create a file with Date inthe format yyyymmdd.txt format
both are different
thanks guys in advance.. (4 Replies)
Discussion started by: apple2685
4 Replies
7. Shell Programming and Scripting
i have few files generated everyday with a date stamp. Sometimes it happens that if the files are generated late i.e after 00:00 hrs the date stamp will be of the next day.
example:
110123_file1
110123_file2
110123_file3
110124_file4
in the above example file4 is also for the previous... (2 Replies)
Discussion started by: gpk_newbie
2 Replies
8. Shell Programming and Scripting
Hi Experts,
i am using the below code get the date of previous day.
#!/usr/bin/ksh
datestamp=`date '+%Y%m%d'`
yest=$((datestamp -1))
echo $yest
When i execute the code i am getting output as:
20130715
What i am trying here is, based on the date passed i am fetching previus day's... (0 Replies)
Discussion started by: learner24
0 Replies
9. Shell Programming and Scripting
Hi,
i am writing a ksh shell script to check the last month end date whether it is falling in last 10 week day date, I am not sure How to use "Mr. Perderabo's date calculator", Could you Please let me know how to use to get my requirement, I tried my own script but duplicate week day and... (5 Replies)
Discussion started by: karthikram
5 Replies
10. UNIX for Beginners Questions & Answers
I Have text like
XXX_20190908.csv.gz need to replace Only date in this format with current date every day
Thanks! (1 Reply)
Discussion started by: yamasani1991
1 Replies
LEARN ABOUT REDHAT
curl_getdate
curl_getdate(3) libcurl Manual curl_getdate(3)
NAME
curl_getdate - Convert an date in a ASCII string to number of seconds since January 1, 1970
SYNOPSIS
#include <curl/curl.h>
time_t curl_getdate(char *datestring, time_t *now");
DESCRIPTION
This function returns the number of seconds since January 1st 1970, for the date and time that the datestring parameter specifies. The now
parameter is there and should hold the current time to allow the datestring to specify relative dates/times. Read further in the date
string parser section below.
PARSING DATES AND TIMES
A "date" is a string, possibly empty, containing many items separated by whitespace. The whitespace may be omitted when no ambiguity
arises. The empty string means the beginning of today (i.e., midnight). Order of the items is immaterial. A date string may contain many
flavors of items:
calendar date items
This can be specified in a number of different ways. Including 1970-09-17, 70-9-17, 70-09-17, 9/17/72, 24 September 1972, 24 Sept
72, 24 Sep 72, Sep 24, 1972, 24-sep-72, 24sep72. The year can also be omitted, for example: 9/17 or "sep 17".
time of the day items
This string specifies the time on a given day. Syntax supported includes: 18:19:0, 18:19, 6:19pm, 18:19-0500 (for specifying the
time zone as well).
time zone items
Specifies international time zone. There are a few acronyms supported, but in general you should instead use the specific realtive
time compared to UTC. Supported formats include: -1200, MST, +0100.
day of the week items
Specifies a day of the week. If this is mentioned alone it means that day of the week in the future.
Days of the week may be spelled out in full: `Sunday', `Monday', etc or they may be abbreviated to their first three letters,
optionally followed by a period. The special abbreviations `Tues' for `Tuesday', `Wednes' for `Wednesday' and `Thur' or `Thurs'
for `Thursday' are also allowed.
A number may precede a day of the week item to move forward supplementary weeks. It is best used in expression like `third mon-
day'. In this context, `last DAY' or `next DAY' is also acceptable; they move one week before or after the day that DAY by itself
would represent.
relative items
A relative item adjusts a date (or the current date if none) forward or backward. Example syntax includes: "1 year", "1 year ago",
"2 days", "4 weeks".
The string `tomorrow' is worth one day in the future (equivalent to `day'), the string `yesterday' is worth one day in the past
(equivalent to `day ago').
pure numbers
If the decimal number is of the form YYYYMMDD and no other calendar date item appears before it in the date string, then YYYY is
read as the year, MM as the month number and DD as the day of the month, for the specified calendar date.
RETURN VALUE
This function returns zero when it fails to parse the date string. Otherwise it returns the number of seconds as described.
AUTHORS
Originally written by Steven M. Bellovin <smb@research.att.com> while at the University of North Carolina at Chapel Hill. Later tweaked by
a couple of people on Usenet. Completely overhauled by Rich $alz <rsalz@bbn.com> and Jim Berets <jberets@bbn.com> in August, 1990.
SEE ALSO
BUGS
Surely there are some, you tell me!
libcurl 7.0 5 March 2001 curl_getdate(3)