I am trying to convert a date string written without hyphens into a date value. I can do so using the INPUT function if the date is written as "2001-01-01" by calling INPUT("2001-01-01", YYMMDD10.) However, I cannot do the same using YYMMDDN8. or any other format that does not include hyphens. INPUT("2001-01-01", YYMMDD10.) = 14976 *Correct! INPUT("20010101", YYMMDDN8.) = 20010101 *Incorrect INPUT("2001.01.01", YYMMDDP8.) = . *Incorrect INPUT("2001 01 01", YYMMDDB8.) = . *Incorrect What am I doing wrong!? Writing a date with hyphens is causing issues when I write a macro to convert a date string into a date value, so I cannot write the date string that way.
... View more