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)
Hi,
I want a script(ksh) to see if today is the last working day(Mon-Fri) of the month. If it is the last working day I need to print current date, else I need the last working day of previous month. Thanks in advance. (1 Reply)
Hi, I'm new with Unix, I'm trying to get a last day of previous month with this format: %b %d %Y (example: Feb 25 2008).
Here is what I have so far.
#!/bin/ksh
cur_month=`date +%m`
cur_year=`date +%Y`
prev_month=$(($cur_month-1))
# Check to see if this is January
if
then
... (11 Replies)
Hello - I have one question regarding the date. I wanted to display the month name for previous day. The output should be as follows...
5-Feb-09 => February
1-Feb-09 => January
28-Feb-09=> February
Here is the code i am using to get the output....
date '+%m %d %Y' |
{
read MONTH DAY... (4 Replies)
Hello,
I'm new to shell scripting.
We've develop a script which will grep a file on the search criteria, MON (Jan/Feb/Mar/etc). But we should set this sript in cron which will run on every first day of the month. The problem I'm having is, when I run the script, it is displaying the contents of... (7 Replies)
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)
Hi Guys,
How to get First day of previous month and last day of previous month from trunc(sysdate) using SQL..?
Thanks in advance.
Br,
pinpe (2 Replies)
Hi All,
I am using the below code to get the year and month from date:
Below gives output like 201212.
dt=`date '+%Y%m'`
how do i get the previous month value(ie: subtract 1 from date)
example output:
dt=201211
Please help. :confused: (3 Replies)
I have requirment to get last date of previous month and the first date of previous 4th month:
Example:
Current date: 20130320 (yyyymmdd)
Last date of previous month: 20130228 (yyyymmdd)
First date of previous 4th month: 20121101 (yyyymmdd)
In my shell --date, -d, -v switches are not... (3 Replies)
Discussion started by: machomaddy
3 Replies
LEARN ABOUT MOJAVE
widget_calendar
widget_calendar(n) widget::calendar Megawidget widget_calendar(n)
__________________________________________________________________________________________________________________________________________________NAME
widget_calendar - widget::calendar Megawidget
SYNOPSIS
package require Tcl 8.4
package require Tk 8.4
package require widget ?3.0?
widget::calendar pathname ?options?
_________________________________________________________________DESCRIPTION
This package provides a calendar megawidget (snidget).
widget::calendar pathname ?options?
WIDGET OPTIONS -command
A script to evaluate when a date was selected.
-dateformat
The format of the date that is returned. Default: %m/%d/%Y.
-firstday
Set first day the week, Either sunday or monday. It defaults to monday.
-font Select the font used in the widget. It defaults to Helvetica 9.
-highlightcolor
Selects the background color for the day that has been selected. Default: #FFCC00
-language
Specify language of the calendar contents. The language is specified by abbreviations of the languge, for example: en - english, de
- german ... It defaults to en.
Supported languages: en, de, fr, it, es, pt, ru, sv, zh, fi
-shadecolor
Selects the color of the parts that have a shaded background. Default: #888888
-showpast
Specify if the past shall be shown. It is a boolean value and defaults to 1.
-textvariable
Specifies the name of a variable whose value is linked to the entry widget's contents. Whenever the variable changes value, the
widget's contents are updated, and vice versa.
WIDGET COMMAND
pathname get ?what?
Returns a part of the selected date or 'all'. The argument what selects the part. Valid values for what are: day, month, year and all.
'all' is the default and returns the complete date in the format given with -dateformat.
DEFAULT BINDINGS
On creation of the calendar widget the following bindings are installed.
o Up - Move to week before current date
o Down - Move to week after current date
o Left - Move to day before current date
o Right - Move to day after current date
o Control-Left - Move to month before current date
o Control-Right - Move to month after current date
o Control-Up - Move to year before current date
o Control-Down - Move to year after current date
EXAMPLE
package require widget::calendar ; # or widget::all
set t [widget::calendar .t]
pack $t -fill x -expand 1
KEYWORDS
megawidget, snit, widget
widget 0.93 widget_calendar(n)