I'm expecting that you'll have more than one row of data with each date, so I'll use this INLINE data as an example :
BASETABLE:
LOAD * INLINE [
myDate,myType
20160628,A
20160628,B
20160627,C
20160627,D
20160627,E
20160623,F
20160623,G
20160623,H
20160620,I
];
Now we'll start by creating a very dumb temporary table with all the unique dates that are available :
UNIQUE_DATE:
LOAD Distinct myDate Resident BASETABLE order by myDate;
We can now, create a new table that will contain all of the existing dates and the correspondent last date :
PREVIOUS_DATE:
LOAD myDate, Previous(myDate) as myPrevDate Resident UNIQUE_DATE order by myDate;
The trick is the command Previous and the fact that we are ordering the table by myDate. Finally you can drop the UNIQUE_TABLE, it won't be needed any more :
DROP TABLE UNIQUE_DATE;
You'll end up with the field myDate (the original one) and the myPrevDate, which contains what (I think) you are expecting.