10 More Discussions You Might Find Interesting
1. Homework & Coursework Questions
I am running a script in ksh to get the 2 months back date from system date.The below code is giving correct date output from putty command prompt.But while running the script is .ksh file it is giving the error below.Please suggest.
; d=a; y=a
m-=num
while(m < 1) {m+=12; y--}... (1 Reply)
Discussion started by: hini
1 Replies
2. HP-UX
Hi there,
is it possible to get the actual date minux six months with just a simple command?
It's easy with Linux but on HP Unix (for me) impossible ;)
Best wishes (3 Replies)
Discussion started by: System
3 Replies
3. Shell Programming and Scripting
Hi
i have a file containg dates likebelow
4/30/2013
3/31/2013
4/30/2013
4/16/2013
4/30/2013
4/30/2013
5/30/2013
5/30/2013
4/30/2013
5/30/2013
5/30/2013
3/31/2013
now i want to compare the above dates with current date and i want to display the difference . (10 Replies)
Discussion started by: siva kumar
10 Replies
4. Shell Programming and Scripting
Hi! all
can any one tell me how to compare current record of column with next and previous record in awk without using array
my case is like this
input.txt
0 32
1 26
2 27
3 34
4 26
5 25
6 24
9 23
0 32
1 28
2 15
3 26
4 24 (7 Replies)
Discussion started by: Dona Clara
7 Replies
5. Shell Programming and Scripting
I have a requirement as follows.
when i pass a date to the perl script, it has to calculate the current date - 8 months and output the date back to the shell script in date format (YYYY-MM-DD).
Current date - 8 months is not constant.. because leap year, and the months jan, mar, may,.... has... (4 Replies)
Discussion started by: kmanivan82
4 Replies
6. Shell Programming and Scripting
In KSH, I am pasting 2 almost identical files together and each one has a date and time on each line. I need to determine if the first instance of the date/time is greater than the 2nd instance of the date/time. If the first instance is greater, I just need to echo that line.
I thought I would... (4 Replies)
Discussion started by: right_coaster
4 Replies
7. UNIX for Dummies Questions & Answers
Hi folks
month=`date +%m`gives current month
Howto print previous month (current month minus 1) with Solaris date and ksh (7 Replies)
Discussion started by: slashdotweenie
7 Replies
8. Shell Programming and Scripting
I have filenames
filenameA_fg_MMDDYY.tar.gz
filenameASPQ_fg_MMDDYY.tar.gz
filenameAFTOPHYYINGH_fg_MMDDYY.tar.gz
filenameAGHYSW_fg_MMDDYY.tar.gz
My requiremnt needs to extract date which is in MMDDYYand change it into YYYYMMDD format.
I have done the following:
filedate=`echo... (5 Replies)
Discussion started by: RubinPat
5 Replies
9. UNIX for Dummies Questions & Answers
can anyone please suggest me on ideas to write a script which has to go back to 100 days from 'current date' and print the date of each day starting from 100th day to current day. (korn shell please)
Thanks
Pavan (5 Replies)
Discussion started by: pavan_test
5 Replies
10. Shell Programming and Scripting
Hi,
I need a shell script which should find the latest date in the field of file and print that line only. For eg.,
I have a file /date.log
Name Date Status
IBM 06/06/07 close
DELL 07/27/07 open
DELL 06/07/07 open
: : :
From... (1 Reply)
Discussion started by: cvkishore
1 Replies
PX_DATE2STRING(3) PX_DATE2STRING(3)
px_date2string - Converts a date into a string.
SYNOPSIS
string px_date2string (resource $pxdoc, int $value, string $format)
DESCRIPTION
Turns a date as it stored in the paradox file into human readable format. Paradox dates are the number of days since 1.1.0000. This func-
tion is just for convenience. It can be easily replaced by some math and the calendar functions as demonstrated in the example below.
PARAMETERS
o $pxdoc
- Resource identifier of the paradox database as returned by px_new(3).
o $value
- Value as stored in paradox database field of type PX_FIELD_DATE.
o $format
- String format similar to the format used by date(3). The placeholders support by this function is a subset of those supported by
date(3) (Y, y, m, n, d, j, L).
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1
Turn a paradox date into a human readable form
<?php
$px = px_new();
/* make up a date as it could be stored in */
/* a date field of a paradox db. */
/* 700000 days since 1.1.0000. */
$days = 700000;
/* Use the calendar functions to print a */
/* human readable format of the date */
echo jdtogregorian($days+1721425)."
";
/* px_date2string() outputs the same */
echo px_date2string($px, $days, "n/d/Y")."
";
px_delete($px);
?>
The above example will output:
7/15/1917
7/15/1917
SEE ALSO
px_timestamp2string(3), jdtogregorian(3).
PHP Documentation Group PX_DATE2STRING(3)