BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
vickram
Calcite | Level 5

Hi _ALL_

This is vicky i am having difficulty in finding latest TIME point from same DATE from below data  , some one  help me.

DATETIMEDEPTH
10/7/201310:25:414781.35
10/9/201316:45:290
10/9/201317:28:310
10/13/20138:54:2275.18197
10/13/201314:03:2787.27948
10/13/201320:46:52115.8728
10/14/20133:18:32135.7762
10/14/20137:38:21153.6802
10/14/201314:44:03181.4292
10/14/201318:57:05209.2909
10/15/20131:13:23237.2716
10/15/20135:26:44265.3894
10/15/20137:57:18274.509
10/15/201312:29:55303.2821
10/15/201316:57:01331.976
10/14/201320:02:00109.1032
10/16/20135:17:51385.9804
10/16/20135:58:19397.7579
10/16/20132:10:00360.8314
10/26/201316:42:01390.7048
10/26/201321:57:56419.0634
10/27/20132:21:01447.8823
10/27/20137:38:20476.3902
10/27/201312:48:38504.8128
10/27/201317:31:18532.0619
10/27/201322:11:26560.8838
10/28/20133:59:01588.7486
10/28/201310:34:02616.647
10/28/201318:17:32643.2316
1 ACCEPTED SOLUTION

Accepted Solutions
Haikuo
Onyx | Level 15

Here is a possible SQL solution:

PROC SQL;

  CREATE TABLE WANT AS

  SELECT * FROM HAVE

   GROUP BY DATE

   HAVING TIME=MAX(TIME)

;

QUIT;

Haikuo

View solution in original post

2 REPLIES 2
Haikuo
Onyx | Level 15

Here is a possible SQL solution:

PROC SQL;

  CREATE TABLE WANT AS

  SELECT * FROM HAVE

   GROUP BY DATE

   HAVING TIME=MAX(TIME)

;

QUIT;

Haikuo

vickram
Calcite | Level 5

HI Haikuo

THANKS FOR YOUR REPLY ITS WORKING.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 475 views
  • 0 likes
  • 2 in conversation