on 09-08-2014 9:42 AM
Hi
,
Basically the problem is that my query is returning day instead of month...
Select MONTH($[OPOR.DocDueDate])
When I run this query on a PO with DocDueDate 22.05.14 (22nd of May) it will find that 22 is the month and give this error message:
Microsoft SQL Server - The conversion of a nvarchar data type to datetime data type resulted in an out-of-range-value
Any ideas?
BR
Kjetil Sandvik
Hi,
Try this:
Select MONTH($[OPOR.DocDueDate.date])
Thanks & Regards,
Nagarajan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kjetil,
This works,
Select SUBSTRING(CONVERT(VARCHAR(10),$[OPOR.DocDueDate], 112), 4, 2)
Hope it helps
Regards,
Augusto
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kjetil,
Could you please test this syntax ?
SELECT DATEPART(MONTH, $[OPOR.DocDueDate])
Regards,
Johan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.