|
Hi
All I
have a date variable (dd-mmm-yyyy) and I would like to create another variable
which is just the year from the first variable. I thought it would be
straightforward but I can’t seem to get anything to work. I’m
obviously missing something. Can anyone help? Thanks, Kind Regards
Mobile: 07766 026 561 Email: [hidden email]
DISCLAIMER: |
|
I will be out of the office from June
22-June 25, returning on the 28th. I will be checking e-mail on a limited
basis. If you need immediate assistance please contact me at 503/539-5606.
Thank you. Kelly |
|
In reply to this post by Kuiama Thompson
Dear Kuiama,
I think you could use some xdate function for this. Please try the code below. HTH, Ruben van den Berg Consultant Models & Methods TNS NIPO Email: [hidden email] Mobiel: +31 6 24641435 Telefoon: +31 20 522 5738 Internet: www.tns-nipo.com *Testdata. data list free/date(edate10). begin data 25-03-2010 1-1-1775 15-9-1978 end data. *Extract year. compute year=xdate.year(date). execute. *Hide decimals. formats year(f1). Date: Tue, 22 Jun 2010 10:11:01 +0100 From: [hidden email] Subject: Separate Year from a date To: [hidden email] Hi All
I have a date variable (dd-mmm-yyyy) and I would like to create another variable which is just the year from the first variable. I thought it would be straightforward but I can’t seem to get anything to work. I’m obviously missing something. Can anyone help?
Thanks,
Kind Regards
Mobile: 07766 026 561 Email: [hidden email]
DISCLAIMER: This email has been scanned for viruses, however we are unable to accept responsibility for any damage caused by the contents. The opinions expressed in this email represent the views of the sender, not Salford PCT unless explicitly stated. If you have received this email in error please notify the sender. The information contained in this email may be subject to public disclosure under the NHS Code of Openness or the Freedom of Information Act 2000. Unless the information is legally exempt from disclosure, the confidentiality of this e-mail and your reply cannot be guaranteed. New Windows 7: Find the right PC for you. Learn more. |
| Free forum by Nabble | Edit this page |
