...
I get a file on anyday of the week, so the file name is like this.
I want to get the tuesday date before this day.
...
What if the date in the file name falls on a Tuesday itself? (e.g. "FILE_NAME_20180417")
I assume, in that case, you want the same date returned, rather than the previous week's Tuesday.
Using Perl's core module Time::Piece, here is a way to do it:
Hi,
I have a date input in MMDDYYYY format..
I have to give the day (whether that DD is sunday/monday...)
Is there any command for it...
Or do I have to write a script for that...
Thanks in Advance
Yeheya (1 Reply)
Hi,
I have a date field which is a variable field being passed to the script from outside.
I need to know how i can add 1 day to it.
I have seen example of date subtraction but while adding each time date reaches 31 or 30 i have to put if else condition.
Or for leap year also.
Kindly let... (4 Replies)
Hi, I have been trying just about every unix command to come up with yesterday's date (today's date - 1). I have seen all of the help on this forum, and none of it seems to work for me here. We are using Sun Solaris 9 Unix. I am using this script to create a .txt file with ftp commands that I will... (2 Replies)
i would need some help in setting the value of a variable (TIME_NOW) depending on the time of the day ...e.g.
if today's date is 12th April 2009 and if the current time is between midnight and 16:59:59 hrs then the TIME_NOW should be yesterday's date i.e. TIME_NOW=11
else if the current time... (3 Replies)
It's easy as pie to get the date minus one day on opensolaris:
date -d "-1 day" +"%Y%m%d"run this command on our crappy Solaris 10 machines however (which I'm guessing doesn't have GNU date running on it) and you get:
date: illegal option -- d
date: illegal option -- 1
date: illegal option --... (5 Replies)
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)
I need to get the next day's date of the user entered date
for example:
Enter date (yyyy/mm/yy):
2013/10/08I need to get the next day's date of the user entered date
Desired Output:
2013/10/09Though there are ways to achieve this is Linux or Unix environment (date command) ,I need to... (1 Reply)