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


/ Published in: Other
Save to your folder(s)

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


Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.