I am trying to write a code to seperate records with overlapping dates. But I have datetime in iso format (2009-10-09T10:00). I seperated the date and time an concatenated them into a different character variable(09OCT2009:10:00). How do I convert this into a numeric variable where I can use operators such as less than and Greater than.
To change a character variable to a numeric variable, you can use the INPUT function. Since your character variable represents a date/time, you can use a date/time INFORMAT with the INPUT function to create a numeric variable that represents the number of seconds since midnight Jan 1, 1960.
There have been many previous posts in this forum and others on how to convert character date variables to numeric variables. If you either look in the documentation on INPUT and INFORMAT or search the forum postings, you should find some useful examples.