Sponsored Content
Top Forums Shell Programming and Scripting How create function valid birthday format dd-mm-yyyy Post 302361963 by Franklin52 on Wednesday 14th of October 2009 02:01:14 PM
Old 10-14-2009
With the given link above you should be able to give it a shot yourself.

Play around with it and come with specific questions about why particular lines in your code don't work.

Regards
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

create filename with 'DD/MM/YYYY' date format

Hi, I can use the following command to create a file with some name then underscore and then date appended to it in the format 'DD-MM-YYYY': touch "newfile_`date '+%d-%m-%Y'`" But it gives me error when I try with the similar command to create a file with the date format 'DD/MM/YYYY'. I... (4 Replies)
Discussion started by: royalibrahim
4 Replies

2. UNIX for Dummies Questions & Answers

Format date from MM/DD/YYYY to YYYYMMDD

I have a file with some date columns in MM/DD/YYYY format: SMPBR|DUP-DO NOT USE|NEW YORK||16105|BA5270715|6/6/2007 |MWERNER|109||||JOHN||SMITH|MD|72211118||||||74559|21 WILMINGTON RD||D|11/6/2003|SL# MD CONTACT-LIZ RICHARDS|||0|Y|N||1411458| And I want to convert the date format to: ... (5 Replies)
Discussion started by: ChicagoBlues
5 Replies

3. Shell Programming and Scripting

date and time in mm/dd/yyyy hh:mm format

Frens, I have a logfile which has got manier things in it and somewer in that file i have a date in mm/dd/yyyy hh:mm format.... I just need to get the date and time nothing else.... i have searched in this forum for it but got only date in mm-dd-yyyy format.. but i need to search for... (10 Replies)
Discussion started by: smarty86
10 Replies

4. Shell Programming and Scripting

change date format from yyyy/mm/dd to dd/mm/yyyy

(Attention: Green PHP newbie !) I have an online inquiry form, delivering a date in the form yyyy/mm/dd to my feedback form. If the content passes several checks, the form sends an e-mail to me. All works fine. I just would like to receive the date in the form dd/mm/yyyy. I tried with some code,... (6 Replies)
Discussion started by: keyboarder
6 Replies

5. Shell Programming and Scripting

Need date in the format [mm dd yyyy hh AM/PM]

could you please help be on the below code .. Requirement is when i pass the parameter(for below 2) i should get current time -2 hours in the format :wall:.. cur_dt=`$ICEBIN/sqsh -S$DSQUERY -U $BATCHID -P $PASSWD -h -C"select getdate()" | sed '2d'` pr_dt="`$ICEBIN/sqsh -S$DSQUERY -U $BATCHID... (2 Replies)
Discussion started by: karthicss
2 Replies

6. Shell Programming and Scripting

Day of year to dd.mm.yyyy format

Hi, How can I convert day of year value in format(yy,doy) to normal formatted (dd.mm.yyyy) string also all of them with awk or awk system function? in_file.txt --------- 12,043 12,044 12,045 12,046 out_file.txt ---------- 12.02.2012 13.02.2012 14.02.2012 15.02.2012 imagine... (5 Replies)
Discussion started by: kocaturk
5 Replies

7. Shell Programming and Scripting

age in months for yyyy-mm-dd format

Hi, I am trying to write a sh script which will give difference in given time to present time in months. I get date from a script like infoscript.sh | awk '{ print $3}' where infoscript is a custom script and gives date in yyyy-mm-dd format ex: 2010-04-12 Now, need to do... (8 Replies)
Discussion started by: rider29
8 Replies

8. Shell Programming and Scripting

Date Format MM/DD/YYYY

I am changing epoch times to dates. I was able to do the following: echo "$varx" | gawk '{print strftime("%c", $0)}' Mon Dec 31 16:26:40 2012 This changes the epoch date (which is what varx is) into localtime. However, my problem is that I only want 12/31/2012 and not the Mon Dec 31... (2 Replies)
Discussion started by: newbie2010
2 Replies

9. Shell Programming and Scripting

How to get last 12 month date in YYYY.MM format?

I need the date format in YYYY.MM format and I am able to get current month date as well as previous month date with below command PM=`date +'%Y.%m' -d 'last month'` CM=`date +'%Y.%m' -d 'now'` but I need to get YYYY.MM date format for previous 12 months so could you please help me how I get... (2 Replies)
Discussion started by: Amit Joshi
2 Replies

10. Shell Programming and Scripting

Date format YYYY/MM/DD to DD/MM/YYYY

I am getting output of YYYY-MM-DD and want to change this to DD/MM/YYYY. When am running the query in 'Todd' to_date(column_name,'DD/MM/YYYY') am getting the required o/p of DD/MM/YYYY, But when am executing the same query(Netezza) in linux server(bash) am getting the output of YYYY-MM-DD file... (3 Replies)
Discussion started by: Roozo
3 Replies
birthday(1)						      General Commands Manual						       birthday(1)

NAME
birthday - warn about upcoming birthdays and other events SYNOPSIS
birthday [-w|-c] [-f file] [-W defwarn] [-M maxwarn] [-m minwarn] [-l lines] [-p weeks] [-d total] [-i width] DESCRIPTION
The birthday command reads a file, by default ~/.birthdays, which gives a list of events in the near future (see section FILE FORMAT for details). It can then produce either a list of events which are coming up within the next few weeks, or a text-based calendar with a few lines for each day. OPTIONS
-w Display a list of upcoming events. This is the default. -c Display a calendar, designed to be piped to lpr(1). -f file Read the events from file rather than ~/.birthdays. If file is a single hyphen, read the events from the standard input (usually the terminal). List Options -W warn Warn warn days in advance, for entries that have no w flag (see FILE FORMAT). If this switch is not specified, it defaults to 21 days. -M max Warn at most max days in advance. This overrides any flag given in the file. -m min Warn at least min days in advance. This overrides any flag given in the file. Calendar Options -l lines Print lines lines for every day. -p weeks Print weeks weeks on every page of the calendar. If set to 0, the default, disables page breaks. -d days Print the calendar for up to days days in advance. -i width Print the calendar width characters wide. This affects the length of the lines separating each day, and the point at which events will be word-wrapped. FILE FORMAT
Each line beginning with a hash sign, `#', is a comment and will be ignored. Lines beginning with an ampersand, `&', are directives. Cur- rently there is only one such directive, &include file, which reads in a seperate file from your .birthdays file. file should be given with an absolute path, which should not use the tilde notation to specify your home directory. Any other line specifies the name of a person or event, followed by an equals sign and a date (DD/MM, DD/MM/YY or DD/MM/YYYY, where the form DD/MM/YY is assumed to give a date in the 20th century and is now deprecated), and finally some extra options. These options are: bd This line is a birthday (the default). The year, if given, should be when the person was born. A line designated as a birthday will produce output like Erin has a birthday in 3 days' time or Jemima is 3 in 2 weeks' time. ann This line is an anniversary. The year, if given, should be the year in which the thing happened, producing output like Pen exploded 3 years ago tomorrow given a line such as Pen exploded=12/09/93 ann. ev This line is an event of some sort. If a year is given, the text will be displayed in that year only; otherwise, it will be dis- played every year. The remaining time is simply appended to the text; for instance, the input Easter=7/4/1996 ev would give rise to the text Easter in 1 week's time. wn Warn n days in advance of the date, rather than the default of 21 days or the number given with the -W flag. todate The event lasts until date, which should be in the same format as for the date of the event. fordays The event lasts for days days. DATE SPECIFICATION
The file format documented here handles dates in a couple of slightly non-standard ways. Firstly, the dates are given in British format of DD/MM/YYYY, as opposed to the more normal US format MM/DD/YYYY. Secondly, dates with a two-digit year are assumed to be in the 20th century (19xx), rather than taking the standard convention of assuming all two-digit years less than 70 are in the 21st century. This is for reasons of compatibility with older data files, since many people have birthdays before 1970, and the program was written before I came across the Y2K issues. :-( You should probably avoid this format. EXAMPLE
Joe Blow=25/04/1974 FILES
~/.birthdays Your default birthdays file. SEE ALSO
cal(1) BUGS
Both the "features" in the DATE SPECIFICATION section could be construed as bugs, and are mostly present for backwards compatibility. The calendar mode should be a seperate program. The program cannot warn more than one year in advance of anything. AUTHOR
Andy Mortimer <andy.mortimer@zetnet.co.uk> birthday(1)
All times are GMT -4. The time now is 06:58 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy