Posted By

retry on 07/29/08


Tagged

dates spss


Versions (?)

Convert a DATE variable into a STRING variable in the form CCYYMMDD


 / Published in: Other
 

This syntax creates a new STRING variable from a DATE variable in the form CCYYMMDD.

  1. STRING date1str (A8).
  2. COMPUTE date1str=CONCAT(STRING(XDATE.YEAR(date1),F4.0),STRING(XDATE.MONTH(date1),N2),STRING(XDATE.MDAY(date1),N2)).

Report this snippet  

You need to login to post a comment.