s-news
[Top] [All Lists]

Formatting dates

To: s-news@lists.biostat.wustl.edu
Subject: Formatting dates
From: Dennis Fisher <fisher@plessthan.com>
Date: Mon, 5 Nov 2007 07:31:25 -0800
Colleagues

I am working with Splus 8.0 in RedHat Linux.  I am attempting to perform a task in Splus that is simple to do in R, reformatting the system time to a string (yymmdd-HHMMSS).

In R, the command is:
> format(Sys.time(), '%y%m%d-%H%M%S')
[1] "071105-072756"

In Splus, date() returns: [1] "Mon Nov 05 07:29:46 PST 2007"
but I cannot find an easy means to reformat it.

Any help will be appreciated.  Thanks.

Dennis



Dennis Fisher MD

P < (The "P Less Than" Company)

Phone: 1-866-PLessThan (1-866-753-7784)

Fax: 1-415-564-2220

www.PLessThan.com


<Prev in Thread] Current Thread [Next in Thread>