November 22, 2022 at 8:38 pm
ISDATE(OPS_PROJ_FMIS.STATE_OPTION_2) = True
Trying evaluate if this OPS_PROJ_FMIS.STATE_OPTION_2 date and keep getting an error
How Do I used IsDate Funtions in this?
November 22, 2022 at 8:59 pm
1=True, 0=False
Try ... ISDATE(OPS_PROJ_FMIS.STATE_OPTION_2) = 1
November 22, 2022 at 10:16 pm
Although this sounds like a strange question, why are you trying to check something to see if it's a date? If you intend to CONVERT it without having a failure, use TRY_CONVERT() or TRY_CAST() instead. If it's a valid DATE or DATETIME, it'll return it in the DATATYPE you specified. If it's not valid, it'll return a null.
Also, when you have a question on a function of this nature, it'll take you less time to look it up than to ask the question on a forum. See the following and look for the RETURN TYPE (an INT, in this case) and a couple of the examples.
https://learn.microsoft.com/en-us/sql/t-sql/functions/isdate-transact-sql
--Jeff Moden
Change is inevitable... Change for the better is not.
November 24, 2022 at 9:59 am
This was removed by the editor as SPAM
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply