|
I need to generate a "day of week" variable
with values "Sunday" thru "Saturday" from data in the following
format.
26.04.2010
26.04.2010 26.04.2010 26.04.2010 01.05.2010 This could be numeric with 1 thru 7 or a string with actual day
names. If it's easier, I already have a date-time variable in this
format:
26-Apr-2010 12:51
26-Apr-2010 22:01 26-Apr-2010 22:01 26-Apr-2010 22:01 1-May-2010 15:48 Can anyone help?
TIA
John Hall |
|
xdate.wkday
I need to generate a "day of week" variable with values "Sunday" thru "Saturday" from data in the following format. 26.04.2010 26.04.2010 26.04.2010 26.04.2010 01.05.2010 This could be numeric with 1 thru 7 or a string with actual day names. If it's easier, I already have a date-time variable in this format: 26-Apr-2010 12:51 26-Apr-2010 22:01 26-Apr-2010 22:01 26-Apr-2010 22:01 1-May-2010 15:48 Can anyone help? TIA John Hall |
|
Rick
Thanks for this. Saved me a lot of time after
all day working on a different data set. Had to think about your reply,
but assumed (correctly) that it was a function. It's given a numeric code,
so all I have to do now is add labels. Only second time I've used dates:
some useful stuff on page 101 and 102 of the reference manual.
John Hall
|
|
Sorry for the rather sparse solution. Glad you figured it out. Try applying the wkday format. That should give you the names of the days of the week, as long as you don't mind English names.
Rick Thanks for this. Saved me a lot of time after all day working on a different data set. Had to think about your reply, but assumed (correctly) that it was a function. It's given a numeric code, so all I have to do now is add labels. Only second time I've used dates: some useful stuff on page 101 and 102 of the reference manual. John Hall ----- Original Message ----- From: Rick Oliver To: [hidden email] Sent: Thursday, July 01, 2010 6:48 PM Subject: Re: Day of week conversion from edate xdate.wkday
I need to generate a "day of week" variable with values "Sunday" thru "Saturday" from data in the following format. 26.04.2010 26.04.2010 26.04.2010 26.04.2010 01.05.2010 This could be numeric with 1 thru 7 or a string with actual day names. If it's easier, I already have a date-time variable in this format: 26-Apr-2010 12:51 26-Apr-2010 22:01 26-Apr-2010 22:01 26-Apr-2010 22:01 1-May-2010 15:48 Can anyone help? TIA John Hall |
| Free forum by Nabble | Edit this page |
