Dear Nina. The syntax below is from the Date and time wizard in SPSS. Eurodate is the original string variable and Date is the resulting date variable. I didn´t find the date format dd/mm/yyyy, but yyyy/mm/dd was available.
* Date and Time Wizard: date. COMPUTE date=date.dmy(number(substr(ltrim(eurodate),1,2),f2.0), number(substr(ltrim(eurodate),3,2),f2.0), number(substr(ltrim(eurodate),5),f4.0)). VARIABLE LABELS date ''. VARIABLE LEVEL date (SCALE). FORMATS date (SDATE10). VARIABLE WIDTH date(10). EXECUTE.
Good luck! Henrik Dal
=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
|
date format dd/mm/yyyy is (ADATE10). From: SPSSX(r) Discussion [mailto:[hidden email]]
On Behalf Of Henrik Dal Dear Nina. The syntax below is from the Date and time wizard in SPSS. Eurodate is the original string variable and Date is the resulting date variable. I didn´t find the date
format dd/mm/yyyy, but yyyy/mm/dd was available.
Good luck! Henrik Dal ===================== To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
This correspondence contains proprietary information some or all of which may be legally privileged; it is for the intended recipient only. If you are not the intended recipient you must not use, disclose, distribute, copy, print, or rely on this correspondence and completely dispose of the correspondence immediately. Please notify the sender if you have received this email in error. NOTE: Messages to or from the State of Connecticut domain may be subject to the Freedom of Information statutes and regulations. ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
Free forum by Nabble | Edit this page |