Hi all, You have all been so helpful, thank you x a million for all the insight you've already provided. I'm checking back in as I am unfortunately still having issues with the coding. I used the below coding and got the below notes. 3276 Adjusted_Datetime = (Incident_Date_time + '30dec1899'd) * 86400; 3277 sasdate = datepart(Adjusted_Datetime); 3278 time = timepart(Adjusted_Datetime); 3279 format sasdate date9. time time8. adjusted_datetime DATEAMPM.; 3280 3281 3282 yrincident=year(sasdate); 3283 monthincident=month(sasdate); 3284 format date mmddyy10. monthincident MONNAME.; 3285 3286 day = weekday(datepart(sasdate)); 3287 format day ; NOTE: Character values have been converted to numeric values at the places given by: (Line):(Column). 3276:26 NOTE: Variable date is uninitialized. NOTE: Invalid numeric data, Incident_Date_Time='-----------------------------------------------------------------------, at line 3276 column 26. NOTE: Missing values were generated as a result of performing an operation on missing values. Each place is given by: (Number of times) at (Line):(Column). 52 at 3276:45 52 at 3277:15 52 at 3278:12 52 at 3282:16 52 at 3283:19 52 at 3286:11 52 at 3286:19 85 at 3290:52 85 at 3291:23 86 at 3292:32 When I print a few rows of observations, the data appears to be true. However, I know it is not converting appropriately since the day reads =6 but in a calendar 01-01-17 was a Sunday. proc print data=work.abc(obs=250); var adjusted_Datetime sasdate time yrincident monthincident day Incident_Date_Time; format day weekdate9. monthincident monthname3.; run; Obs Adjusted_Datetime sasdate time yrincident monthincident day Incident_Date_Time1234567 01JAN17:12:00:00 AM 01JAN2017 0:00:00 2017 January 6 42736 01JAN17:12:03:08 AM 01JAN2017 0:03:08 2017 January 6 42736.002175925925 01JAN17:12:10:00 AM 01JAN2017 0:10:00 2017 January 6 42736.006944444445 01JAN17:12:10:00 AM 01JAN2017 0:10:00 2017 January 6 42736.006944444445 01JAN17:12:11:43 AM 01JAN2017 0:11:43 2017 January 6 42736.00813657408 01JAN17:12:19:10 AM 01JAN2017 0:19:10 2017 January 6 42736.01331018518 01JAN17:12:25:47 AM 01JAN2017 0:25:47 2017 January 6 42736.017905092594 Like wise I changed the format to assess if it at least maintained a right pattern, but again it changed: proc print data=work.abc (obs=250); var adjusted_Datetime sasdate time yrincident monthincident day Incident_Date_Time; format day WEEKDAYw. monthincident MONTH.; run; Obs Adjusted_Datetime sasdate time yrincident monthincident day Incident_Date_Time1234567 01JAN17:12:00:00 AM 01JAN2017 0:00:00 2017 January Thursday 42736 01JAN17:12:03:08 AM 01JAN2017 0:03:08 2017 January Thursday 42736.002175925925 01JAN17:12:10:00 AM 01JAN2017 0:10:00 2017 January Thursday 42736.006944444445 01JAN17:12:10:00 AM 01JAN2017 0:10:00 2017 January Thursday 42736.006944444445 01JAN17:12:11:43 AM 01JAN2017 0:11:43 2017 January Thursday 42736.00813657408 01JAN17:12:19:10 AM 01JAN2017 0:19:10 2017 January Thursday 42736.01331018518 01JAN17:12:25:47 AM 01JAN2017 0:25:47 2017 January Thursday 42736.017905092594 Any thoughts or advise would be incredibly appreciated!!!
... View more