Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • string with scientific notation

    Hello,

    i want to create string variable from numeric variable id, that looks like for example 1021002810 or 30201300080201 and is of the type double and format %17.0g. I use command:
    Code:
    gen str17 ids= string(id)
    but i get string that has scientific notation, for example 1.02e+09 or 3.03e+15. Why does this happen and how can i get string that just contains the long number, just in string type?
    Thanks
    Neko


  • #2
    Code:
    tostring id, gen(ids) format("%17.0f")

    Comment


    • #3
      Thanks a lot!

      Comment

      Working...
      X