Guest User

Untitled

a guest
Apr 23rd, 2018
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. clear
  2.  
  3. input str80 string
  4. "06-08-2003"
  5. "30-02-1934"
  6. "19-11-1923"
  7. "12-04-1997"
  8. "29-12-1945"
  9. end
  10.  
  11. encode string, generate(numeric)
  12.  
  13. sort numeric
  14. list
  15.  
  16. +-------------------------+
  17. | string numeric |
  18. |-------------------------|
  19. 1. | 06-08-2003 06-08-2003 |
  20. 2. | 12-04-1997 12-04-1997 |
  21. 3. | 19-11-1923 19-11-1923 |
  22. 4. | 29-12-1945 29-12-1945 |
  23. 5. | 30-02-1934 30-02-1934 |
  24. +-------------------------+
  25.  
  26. drop numeric
  27.  
  28. generate numeric = date(string, "DMY")
  29. format %tddd-NN-YY numeric
  30.  
  31. list
  32.  
  33. +-----------------------+
  34. | string numeric |
  35. |-----------------------|
  36. 1. | 06-08-2003 6-08-03 |
  37. 2. | 12-04-1997 12-04-97 |
  38. 3. | 19-11-1923 19-11-23 |
  39. 4. | 29-12-1945 29-12-45 |
  40. 5. | 30-02-1934 . |
  41. +-----------------------+
  42.  
  43. sort numeric
  44. list
  45.  
  46. +-----------------------+
  47. | string numeric |
  48. |-----------------------|
  49. 1. | 19-11-1923 19-11-23 |
  50. 2. | 29-12-1945 29-12-45 |
  51. 3. | 12-04-1997 12-04-97 |
  52. 4. | 06-08-2003 6-08-03 |
  53. 5. | 30-02-1934 . |
  54. +-----------------------+
Add Comment
Please, Sign In to add comment