g+
g+ Communities
Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013 
<== Date ==> <== Thread ==>

Subject: date format
From: Graham Waters <waters@triumf.ca>
To: tech-talk@aps.anl.gov
Date: Fri, 16 Mar 2007 13:29:52 -0700
I notice the output format for date() for R3.14 is difference from R3.13. In detail
tsStampToText() is replaced by epicsTimeToStrftime(). Is there any functionality
somewhere to return the name of the month ("Mar" rather than "03").


For the moment I am doing something like this in a R3.14.8.2 applications.

static char    monthText[] = "JanFebMarAprMayJunJulAugSepOctNovDec";
epicsTimeStamp now;
char nowText[40], monthText[6];
int imonth

epicsTimeGetCurrent(&now);
epicsTimeToStrftime(nowText,sizeof(nowText);
       "%Y/%m/%d %H:%M:%S.%06f",&now);            /* Get time string */

sscanf(&nowText[5],"%d",&imonth); /* extract month as an integer */
sprintf(monthText,"%3.3s",&monthText[ (imonth-1)*3]); /* convert to month name */


Graham

For every expert there is an equal and opposite expert -- Arthur C Clarke

+---------------------------------------------------------------------+
|Graham Waters, Control System Eng phone: (604)-222-1047 ext 6531 |
|TRIUMF --- University of B.C, Fax: (604)-222-7307 |
|Vancouver, BC, Canada e-mail: Graham.Waters@triumf.ca |
| |
|http://isacwserv.triumf.ca/edevel/homepage/graham01.html |
+---------------------------------------------------------------------+




Replies:
Re: date format Kay-Uwe Kasemir

Navigate by Date:
Prev: Accessing Date and Time information David Dudley
Next: Re: date format Kay-Uwe Kasemir
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013 
Navigate by Thread:
Prev: Re: Accessing Date and Time information Andrew Johnson
Next: Re: date format Kay-Uwe Kasemir
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013 
ANJ, 10 Nov 2011 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICSv4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·