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.
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy