'How to Remove Date Format SAS

I have a column of dates with the DATE9. format applied. How can I remove that format so it just shows the SAS date number. For example, I have the date 01JUN2021 but I want it as 22432.

sas


Solution 1:[1]

Use the format statement but don't apply a format. This essentially removes a format. Alternatively you could apply a numeric format such as 8. or best12.

format variableName;

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Reeza