03-09-2017 04:22 PM
I'm having a hard time trying to figure this out:
I have a column with date format, but when trying to user MONTH() oir YEAR() to extract information from it, the return is a blank cell.
Attached a pic of the query result.
Thanks a lot!
03-09-2017 06:00 PM
Please slap any of your developers or data designers for calling that a date if that is why you thought it was a date value. Slap them twice if they are forcing continuing the time value parts around if they are ALWAYS 00:00:00. There seems to be some sloppy stuff regarding dates and possibly Microsoft defaults that are becoming very common place.
03-10-2017 07:00 AM
I'm reading a table from an Oracle DB, at least when I read it in Oracle SQL Developer it is showing as a date field, but I will take some time to look into it, since we are thinking about automating some processes in SAS, this might turn out to be an issue upfront.
Thanks for the comment!
03-10-2017 11:30 AM
If your reading from an Oracle DB it may not be the designers fault. Oracle doesn't have a standard date only type. Even the type called DATE has hours, minutes and seconds included whether you want them or not. As a result when SAS pulls a DATE column from Oracle it treats it as a DATETIME, since that's really what it is.
Need further help from the community? Please ask a new question.