Announcement

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

  • How to drop date time variable?

    Hi,

    I have a date time variable with %tc format like the following:
    Submisisondate
    22mar2022 19:35:04
    22mar2022 19:35:05
    22mar2022 19:35:03
    I want to drop observations with lowest submission value (i.e: 22mar2022 19:35:05). How can I do this?

    Thank you so much.

    Lanna

  • #2
    I don't understand. You call 22mar2022 19:35:05 the lowest submission value, but it is, in fact, the highest in your example. So please clarify what you want to do.

    Comment


    • #3
      Hi Clyde, I want to drop the latest entry. It is 22mar2022 19:35:05 in my example.
      Thank you so much.

      Lanna

      Comment


      • #4
        Code:
        sort Submisisondate
        drop if _n==_N

        Comment


        • #5
          Thank you, it worked beautifully!

          Comment

          Working...
          X