LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (September 2008)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 23 Sep 2008 11:12:44 +0100
Reply-To:   Muir Houston <m.houston@educ.gla.ac.uk>
Sender:   "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:   Muir Houston <m.houston@educ.gla.ac.uk>
Subject:   Re: Date format
Comments:   To: Art@DrKendall.org
Content-Type:   text/plain; charset="iso-8859-1"

Hi Art, your solution worked fine - and you interpreted what I wanted - a date variable thanks Muir Dr Muir Houston Lecturer DACE Faculty of Education University of Glasgow 0141-330-4699

________________________________

From: Art Kendall [mailto:Art@DrKendall.org] Sent: Mon 22/09/2008 13:37 To: Muir Houston Cc: SPSSX-L@LISTSERV.UGA.EDU Subject: Re: Date format

I assumed that you wanted a date variable,and that inserting the punctuation was just a step toward that. If not please reply, it is also possible to create a string variable that people will read as a date, but will not be a date variable. try something like this untested syntax, be sure to double check the century assigned. You may want the date variable to be displayed in a format other than date10.

numeric myday mymonth myyear (f2). compute myday = number(substr(olddate,1,2),f2). compute mymonth = number(substr(olddate,3,2),f2). compute myyear = number(substr(olddate,5,2),f2). numeric newdate (date10). compute newdate = date.dmy(myday,mymonth,myyear).

Art Kendall Social Research Consultants

Muir Houston wrote: > Hi Listers > > Trying to use a date format - the excel file I am importing has two > fields which contain dates in a ddmmyy format - however, there are no > spaces or punctuation between dd mm and yy > > Is the best way to insert a '.' or '/' between parts of the string or is > there another way > > I tried using the GUI to change to one of the date formats offered, but > succeeded only in wiping out the data - so shut down and open again > > > Thanks > > Muir > > ===================== > To manage your subscription to SPSSX-L, send a message to > LISTSERV@LISTSERV.UGA.EDU (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 > > >

====================To manage your subscription to SPSSX-L, send a message to LISTSERV@LISTSERV.UGA.EDU (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


Back to: Top of message | Previous page | Main SPSSX-L page