Date, date date date....
Date is driving me crazy. I simply need to calculate the age of a person:
this is what doesn't work:
public int getAge(Person person)
long d = new java.util.Date().getTime();
long m =person.dateOfBirth().getTime();
SimpleDateFormat formatter = new SimpleDateFormat("yy");
return (new Integer(formatter.format(age))).intValue();
I'm getting 91 for a person who's born in 1983
Since getYear() is depreciated I don't like to use that
I found that Calender could do the job, but how do I cast Date into
Calender in an easy way?
hin...get unix time for a given date
I'm wracking my brain trying to get this working but cant seem to
fathom it out.
I have a date like: 03/14/06 and want to get the unixtime from it.
I have tried to use time local like so:
my ($mon, $day, $year) = ($date =~ m!(\d\d)/(\d\d)/(\d\d)!);
my $unixtime = timelocal(0, 0,0, $day, ($mon - 1), ($year - 1900));
And i get the following output:
Setting 03/14/06 to be unixtime
Day too small - -717264 > -24856
Sec too small - -717264 < 74752
Cannot handle date (0, 0, 0, 14, 2, 6) at ./look_for_mod.pl line 156
What am i doing wrong? I cant work it out....
Cheers fo...apt-get install as root or su -c 'apt-get install' as user
apt-get install needs to be executed as root.
What is the difference regarding security of my computer of the both
On 2008-01-12, Tilo Baumann <email@example.com> wrote:
> apt-get install needs to be executed as root.
> What is the difference regarding security of my computer of the both
When you use su -c or sudo, root privileges are dropped as soon as the
command is complete. /var/log/auth.log shows what command was executed,
instead of just showing when someone logged in as root.
O...Where does DB2 get it's CLASSPATH in a UNIX install?
You get it when you execute the db2profile (in $INSTHOME/sqllib).
...Installing 10gR2 in UNIX AIX While 8i Databases are Running
I have four 8i databases running on UNIX AIX 5.2. I want to install
Oracle Server 10.2.0.1 while the databases continue to run as 8i. I do
not want to shut them down during the install. About a week after the
install I will upgrade the databases from 8i to 10g.
The Oracle Database Installation Guide says on page 2-35 (items 7 and
8) to edit the oracle user's shell startup file (.profile in the Korn
shell). I am to add "umask 022" and to comment out the settings for
variables ORACLE_SID, ORACLE_HOME, and ORACLE_BASE. Doing this means
the changes in .profile will apply to all new ...How to unzip and install the files in AIX 5.3 Unix Server
Hi Unix Group Mates,
I would like to seek your advice. I'm trying to upgrade the zip and
unzip utilities for our AIX 5.3 Unix Server. I have download the
installer to my local notebook. However I don't know how to install
this to the server.
I'm really looking forward for my friends reply here.
Many thanks in advance.
I really appreciate all of your help.
On 8 fev, 09:49, "afeena83" <fina...@gmail.com> wrote:
> Hi Unix Group Mates,
> I would like to seek your advice. I'm trying to upgrade the zip and
> unzip utilities ...RS6000 43p/140 AIX 4.3 new install
Good morning -
I've recently come into ownership of a well used RS6k 43p model 140
terminal server (and all the serial gear came with it! Very cool!).
I've got the manuals for the RS6k, and for the full version of AIX 4.3
that came with it (install guides, network maintenance guides, etc). I
popped a used 4.3gb barracuda drive in, and ran the AIX install off the
CD by a serial console (I've managed to use both the greenscreen serial
terminal that came with it, and my laptop w/ Hypertrm as a console).
The first CD finished up the installation, then rebooted. Now when it
boots, I...Getting most recent date and closes date
I'm trying to create a data set that has the most current(or recent)
date and the date closes to the that date for each ID.
Ultimately what I'm need is the number of days between the two dates.
The dataset would look like the following.
ID COUNT most_recent_date closes_date diff_days
2758 3 13APR2007 21MAR2007 23
2759 1 09FEB2007 09FEB2007 0
2760 2 26FEB...Difference between HP Unix and Unix AIX
What are the difference between HP Unix and HP AIX at command line ???
Is there any ?
> What are the difference between HP Unix and HP AIX at command line ???
> Is there any ?
Unless you're getting into system dependent stuff, no, there's no real
difference. However, one real difference is that AIX is an IBM and not
an HP product.
...Get BEST date? Get Closest Row?
Please excuse my last post. That was insane and i don't expect
anybody to think about that crazy excuse of a problem. But if someone
does have anything to offer for it that would be hugely appreciated
That said, and to boil down what I need.
I have two tables
Activity (many rows per ssn but no overlaping of dates))
Participation (many rows per snn but no overlaping of dates):
I need to write a function that returns the Earliest (BEST)
termination date given some values in.
ssn, effective date, peri...Re: Getting most recent date and closes date
I don't know how this will scale to your 20M records. If then number
of IDs is "reasonable" it could be tolerable. Do you have an idea
about the number of IDs?
input id date:date9. @@;
format date date9.;
2758 21MAR2007 2758 10JAN2007 2758 13APR2007
2760 31JAN2007 2760 26FEB2007
2763 15JAN2007 2763 16APR2007 2763 29MAR2007 2763 01FEB2007
proc summary data=work.test nway;
rename=(_freq_=Count date_1=MostRecient date_2=Closest)
...how to get tomorrow date using Date::CALC
want to take a date and return tomorrow's date..
How to convert $tomorrow back to YY-MM-DD format?
What is the inverse of Date_to_Days ?
... perl2.pl ---------------------------
use strict; use warnings; use Date::Calc qw(:all);
my ($yr2, $mon2, $day2, $tomorrow); my ($year, $month, $day);
$yr2 = 2005; $mon2 = 3; $day2 = 20;
print (" date- year: $yr2 month: $mon2 day:$day2 \n");
$tomorrow = Date_to_Days($yr2,$mon2,$day2) + 1;
print ("tomorrow: $tomorrow \n");
($year,$month,$day) = Today([$tomorrow]);
print ("tommorow- year: $year mon...adjust date (date -a) in AIX 5.2
can I check wether date adjusting is in progress or no?
Is it known how long time does is take (eg 1 delta sec/ 1 real min)?
Entering more than one "date -e" will combined or the second replaces
the first or what?
(The manual is does not explain these questions)
...Have used apt-get install to install Wine again
but now when i try to run my program i get...
frazelle09@LaGrandota:~/.wine/drive_c/Ocean$ wine ./ocean.exe
Xlib: extension "GLX" missing on display ":0.0".
err:wgl:X11DRV_WineGL_InitOpenglInfo couldn't initialize OpenGL,
plus the Register dump and the Backtrace.
i haven't changed anything on the computer, just did apt-get update,
apt-get dist-upgrade and it asked if i wanted to install Wine. "Yes".
Bam. Now the program i use doesn't work anymore and if i run it from
the Terminal i get the above...