Concatanate data

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Concatanate data

MOUNKARA Yakoubou
HelloI would like to concatanate 3 colums of numbers in order to get a date
format.
example
day                 month              year
12                   10                    2007
30                     7                    2001
25                     1                    1999
After the concatanate to get for the first line  12/10/2007

Thanks!
--
MOUNKARA Yakoubou
GIS/Data Base Manager
CI-DNPGCA
Centre d'Information du Dispositif National de Prévention et de Gestion des
Crises Alimentaires
Cell:+227 96 96 78 24
      +227 21 79 17 11
bur Tel: +227 20 72 32 75

====================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
Reply | Threaded
Open this post in threaded view
|

Re: Concatanate data

Marta Garcia-Granero
MOUNKARA Yakoubou wrote:

> HelloI would like to concatanate 3 colums of numbers in order to get a date
> format.
> example
> day                 month              year
> 12                   10                    2007
> 30                     7                    2001
> 25                     1                    1999
> After the concatanate to get for the first line  12/10/2007
>
>
>
Try this code.

* Sample dataset *.
DATA LIST LIST/day month year (3 F8).
BEGIN DATA
12 10 2007
30  7 2001
25  1 1999
END DATA.

* Computing age from elements *.
COMPUTE date = DATE.DMY(day,month,year) .
FORMAT date(EDATE).
LIST.

HTH,
Marta García-Granero


--
For miscellaneous statistical stuff, visit:
http://gjyp.nl/marta/

=====================
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
Reply | Threaded
Open this post in threaded view
|

Re: Concatanate data

ViAnn Beadle
In reply to this post by MOUNKARA Yakoubou
Use the Date Wizard.

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
MOUNKARA Yakoubou
Sent: Monday, September 29, 2008 2:30 AM
To: [hidden email]
Subject: Concatanate data

HelloI would like to concatanate 3 colums of numbers in order to get a date
format.
example
day                 month              year
12                   10                    2007
30                     7                    2001
25                     1                    1999
After the concatanate to get for the first line  12/10/2007

Thanks!
--
MOUNKARA Yakoubou
GIS/Data Base Manager
CI-DNPGCA
Centre d'Information du Dispositif National de Prévention et de Gestion des
Crises Alimentaires
Cell:+227 96 96 78 24
      +227 21 79 17 11
bur Tel: +227 20 72 32 75

=======
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

=====================
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