Showing posts with label specific. Show all posts
Showing posts with label specific. Show all posts

Tuesday, March 27, 2012

Daylight Savings Time changes coming in 2007

I apologize ahead of time if this has been covered. I tried searching but found only the OS specific response to my question (http://www.microsoft.com/windows/timezone/dst2007.mspx).

With the coming changes to DST in 2007, is there -- or is there even a need to -- patch either SQL Server 2005 or 2000 to account for those changes?

Doug,

have you received any responses yet to this question? I too have the same question and have only found the page that you already linked too as well. Please let me know if you find out anything.

Thanks,

Chad (chad.smith@.lucasfilm.com)

|||

There has been a lot discussion in the SQL org about this. To date, we have determined SQL is pulling all dates from the OS so no updates from SQL are needed. If we eventually find a problem we'll definitely release an update.

Thanks,

Peter Saddow

|||What about releasing a "rebasing" utility like the one issued for Outlook and Exchange?|||How about date arithmetic? Wouldn't that be affected by this change?|||

Consider this:

You have a calculation that comes up with a date/time in the future with a result as UTC value. Let's assume that future date falls somewhere between 3/11, 2AM and 4/1 2AM. This UTC value must be wrong because you haven't applied any DST related patches yet. If you store this value for future use, it will be wrong.

You apply OS DST patch.

You do the same calculation as before. This time, UTC will not be different by just the amount of time that passed between two calculations. Extra hour will be added because that is what the patch corrects.

The first value is still wrong and something must be done about it. That's why Microsoft issued "rebasing" tool for Outlook and Exchange.

It's not enough to say: "you'll be fine as soon as you patch OS". This doesn't fix bad dates that are being calculated and stored today.

I'm still waiting for someone to explain to me why the above line of thinking doesn't apply to SQL Server (or any other Windows application).

All you MVPs out there?

|||The anwser to your question, is that SQL server itself is not responsible for the data being stored in it. So any application that is storing its data in SQL server will need to come out with an update to compensate for the change in Daylight Savings Time if the developer deems there to be an issue, where the dates and times that are stored in it would be affected.|||

By now SQL Server has been added to the list of Microsoft products affected by DST change. It will requre patching. That was the original issue that started this thread.

I don't know how SQL Server scheduler stores dates but some schedulers have been affected if they store dates as UTC (or GMT). For me, jury is still out on this.

|||

Here is some SQL script that I’ve come up with to calculate the daylight savings for -2006 and +2007.

http://2pttechnology.com/Web/forums/thread/19.aspx

|||I am a computer illiterazzi. I just want a simple, no hassle patch to fix my computer which is a Windows XP 2002 Service Pack. There are so many selections, I am terrified I will pick the wrong one and screw my expensive new computer. I don't use outlook to my knowledge. I can't find that the daylight savings patch has been downloaded automatically. There are a gadzillion downloads in my computer record. Please help. Thanks.sql

Daylight Savings Time changes coming in 2007

I apologize ahead of time if this has been covered. I tried searching but found only the OS specific response to my question (http://www.microsoft.com/windows/timezone/dst2007.mspx).

With the coming changes to DST in 2007, is there -- or is there even a need to -- patch either SQL Server 2005 or 2000 to account for those changes?

Doug,

have you received any responses yet to this question? I too have the same question and have only found the page that you already linked too as well. Please let me know if you find out anything.

Thanks,

Chad (chad.smith@.lucasfilm.com)

|||

There has been a lot discussion in the SQL org about this. To date, we have determined SQL is pulling all dates from the OS so no updates from SQL are needed. If we eventually find a problem we'll definitely release an update.

Thanks,

Peter Saddow

|||What about releasing a "rebasing" utility like the one issued for Outlook and Exchange?|||How about date arithmetic? Wouldn't that be affected by this change?|||

Consider this:

You have a calculation that comes up with a date/time in the future with a result as UTC value. Let's assume that future date falls somewhere between 3/11, 2AM and 4/1 2AM. This UTC value must be wrong because you haven't applied any DST related patches yet. If you store this value for future use, it will be wrong.

You apply OS DST patch.

You do the same calculation as before. This time, UTC will not be different by just the amount of time that passed between two calculations. Extra hour will be added because that is what the patch corrects.

The first value is still wrong and something must be done about it. That's why Microsoft issued "rebasing" tool for Outlook and Exchange.

It's not enough to say: "you'll be fine as soon as you patch OS". This doesn't fix bad dates that are being calculated and stored today.

I'm still waiting for someone to explain to me why the above line of thinking doesn't apply to SQL Server (or any other Windows application).

All you MVPs out there?

|||The anwser to your question, is that SQL server itself is not responsible for the data being stored in it. So any application that is storing its data in SQL server will need to come out with an update to compensate for the change in Daylight Savings Time if the developer deems there to be an issue, where the dates and times that are stored in it would be affected.|||

By now SQL Server has been added to the list of Microsoft products affected by DST change. It will requre patching. That was the original issue that started this thread.

I don't know how SQL Server scheduler stores dates but some schedulers have been affected if they store dates as UTC (or GMT). For me, jury is still out on this.

|||

Here is some SQL script that I’ve come up with to calculate the daylight savings for -2006 and +2007.

http://2pttechnology.com/Web/forums/thread/19.aspx

|||I am a computer illiterazzi. I just want a simple, no hassle patch to fix my computer which is a Windows XP 2002 Service Pack. There are so many selections, I am terrified I will pick the wrong one and screw my expensive new computer. I don't use outlook to my knowledge. I can't find that the daylight savings patch has been downloaded automatically. There are a gadzillion downloads in my computer record. Please help. Thanks.

Daylight Savings Time changes coming in 2007

I apologize ahead of time if this has been covered. I tried searching but found only the OS specific response to my question (http://www.microsoft.com/windows/timezone/dst2007.mspx).

With the coming changes to DST in 2007, is there -- or is there even a need to -- patch either SQL Server 2005 or 2000 to account for those changes?

Doug,

have you received any responses yet to this question? I too have the same question and have only found the page that you already linked too as well. Please let me know if you find out anything.

Thanks,

Chad (chad.smith@.lucasfilm.com)

|||

There has been a lot discussion in the SQL org about this. To date, we have determined SQL is pulling all dates from the OS so no updates from SQL are needed. If we eventually find a problem we'll definitely release an update.

Thanks,

Peter Saddow

|||What about releasing a "rebasing" utility like the one issued for Outlook and Exchange?|||How about date arithmetic? Wouldn't that be affected by this change?|||

Consider this:

You have a calculation that comes up with a date/time in the future with a result as UTC value. Let's assume that future date falls somewhere between 3/11, 2AM and 4/1 2AM. This UTC value must be wrong because you haven't applied any DST related patches yet. If you store this value for future use, it will be wrong.

You apply OS DST patch.

You do the same calculation as before. This time, UTC will not be different by just the amount of time that passed between two calculations. Extra hour will be added because that is what the patch corrects.

The first value is still wrong and something must be done about it. That's why Microsoft issued "rebasing" tool for Outlook and Exchange.

It's not enough to say: "you'll be fine as soon as you patch OS". This doesn't fix bad dates that are being calculated and stored today.

I'm still waiting for someone to explain to me why the above line of thinking doesn't apply to SQL Server (or any other Windows application).

All you MVPs out there?

|||The anwser to your question, is that SQL server itself is not responsible for the data being stored in it. So any application that is storing its data in SQL server will need to come out with an update to compensate for the change in Daylight Savings Time if the developer deems there to be an issue, where the dates and times that are stored in it would be affected.|||

By now SQL Server has been added to the list of Microsoft products affected by DST change. It will requre patching. That was the original issue that started this thread.

I don't know how SQL Server scheduler stores dates but some schedulers have been affected if they store dates as UTC (or GMT). For me, jury is still out on this.

|||

Here is some SQL script that I’ve come up with to calculate the daylight savings for -2006 and +2007.

http://2pttechnology.com/Web/forums/thread/19.aspx

|||I am a computer illiterazzi. I just want a simple, no hassle patch to fix my computer which is a Windows XP 2002 Service Pack. There are so many selections, I am terrified I will pick the wrong one and screw my expensive new computer. I don't use outlook to my knowledge. I can't find that the daylight savings patch has been downloaded automatically. There are a gadzillion downloads in my computer record. Please help. Thanks.

Sunday, March 25, 2012

Daylight Savings Time changes coming in 2007

I apologize ahead of time if this has been covered. I tried searching but found only the OS specific response to my question (http://www.microsoft.com/windows/timezone/dst2007.mspx).

With the coming changes to DST in 2007, is there -- or is there even a need to -- patch either SQL Server 2005 or 2000 to account for those changes?

Doug,

have you received any responses yet to this question? I too have the same question and have only found the page that you already linked too as well. Please let me know if you find out anything.

Thanks,

Chad (chad.smith@.lucasfilm.com)

|||

There has been a lot discussion in the SQL org about this. To date, we have determined SQL is pulling all dates from the OS so no updates from SQL are needed. If we eventually find a problem we'll definitely release an update.

Thanks,

Peter Saddow

|||What about releasing a "rebasing" utility like the one issued for Outlook and Exchange?|||How about date arithmetic? Wouldn't that be affected by this change?|||

Consider this:

You have a calculation that comes up with a date/time in the future with a result as UTC value. Let's assume that future date falls somewhere between 3/11, 2AM and 4/1 2AM. This UTC value must be wrong because you haven't applied any DST related patches yet. If you store this value for future use, it will be wrong.

You apply OS DST patch.

You do the same calculation as before. This time, UTC will not be different by just the amount of time that passed between two calculations. Extra hour will be added because that is what the patch corrects.

The first value is still wrong and something must be done about it. That's why Microsoft issued "rebasing" tool for Outlook and Exchange.

It's not enough to say: "you'll be fine as soon as you patch OS". This doesn't fix bad dates that are being calculated and stored today.

I'm still waiting for someone to explain to me why the above line of thinking doesn't apply to SQL Server (or any other Windows application).

All you MVPs out there?

|||The anwser to your question, is that SQL server itself is not responsible for the data being stored in it. So any application that is storing its data in SQL server will need to come out with an update to compensate for the change in Daylight Savings Time if the developer deems there to be an issue, where the dates and times that are stored in it would be affected.|||

By now SQL Server has been added to the list of Microsoft products affected by DST change. It will requre patching. That was the original issue that started this thread.

I don't know how SQL Server scheduler stores dates but some schedulers have been affected if they store dates as UTC (or GMT). For me, jury is still out on this.

|||

Here is some SQL script that I’ve come up with to calculate the daylight savings for -2006 and +2007.

http://2pttechnology.com/Web/forums/thread/19.aspx

|||I am a computer illiterazzi. I just want a simple, no hassle patch to fix my computer which is a Windows XP 2002 Service Pack. There are so many selections, I am terrified I will pick the wrong one and screw my expensive new computer. I don't use outlook to my knowledge. I can't find that the daylight savings patch has been downloaded automatically. There are a gadzillion downloads in my computer record. Please help. Thanks.

Daylight Savings Time changes coming in 2007

I apologize ahead of time if this has been covered. I tried searching but found only the OS specific response to my question (http://www.microsoft.com/windows/timezone/dst2007.mspx).

With the coming changes to DST in 2007, is there -- or is there even a need to -- patch either SQL Server 2005 or 2000 to account for those changes?

Doug,

have you received any responses yet to this question? I too have the same question and have only found the page that you already linked too as well. Please let me know if you find out anything.

Thanks,

Chad (chad.smith@.lucasfilm.com)

|||

There has been a lot discussion in the SQL org about this. To date, we have determined SQL is pulling all dates from the OS so no updates from SQL are needed. If we eventually find a problem we'll definitely release an update.

Thanks,

Peter Saddow

|||What about releasing a "rebasing" utility like the one issued for Outlook and Exchange?|||How about date arithmetic? Wouldn't that be affected by this change?|||

Consider this:

You have a calculation that comes up with a date/time in the future with a result as UTC value. Let's assume that future date falls somewhere between 3/11, 2AM and 4/1 2AM. This UTC value must be wrong because you haven't applied any DST related patches yet. If you store this value for future use, it will be wrong.

You apply OS DST patch.

You do the same calculation as before. This time, UTC will not be different by just the amount of time that passed between two calculations. Extra hour will be added because that is what the patch corrects.

The first value is still wrong and something must be done about it. That's why Microsoft issued "rebasing" tool for Outlook and Exchange.

It's not enough to say: "you'll be fine as soon as you patch OS". This doesn't fix bad dates that are being calculated and stored today.

I'm still waiting for someone to explain to me why the above line of thinking doesn't apply to SQL Server (or any other Windows application).

All you MVPs out there?

|||The anwser to your question, is that SQL server itself is not responsible for the data being stored in it. So any application that is storing its data in SQL server will need to come out with an update to compensate for the change in Daylight Savings Time if the developer deems there to be an issue, where the dates and times that are stored in it would be affected.|||

By now SQL Server has been added to the list of Microsoft products affected by DST change. It will requre patching. That was the original issue that started this thread.

I don't know how SQL Server scheduler stores dates but some schedulers have been affected if they store dates as UTC (or GMT). For me, jury is still out on this.

|||

Here is some SQL script that I’ve come up with to calculate the daylight savings for -2006 and +2007.

http://2pttechnology.com/Web/forums/thread/19.aspx

|||I am a computer illiterazzi. I just want a simple, no hassle patch to fix my computer which is a Windows XP 2002 Service Pack. There are so many selections, I am terrified I will pick the wrong one and screw my expensive new computer. I don't use outlook to my knowledge. I can't find that the daylight savings patch has been downloaded automatically. There are a gadzillion downloads in my computer record. Please help. Thanks.

Thursday, March 22, 2012

Date-time unsupported in subquery?

I have a query that returns 2 fields, a date-time field and a Count(*)
field. Basically it tells me how many people exist for a specific date. I
want to use this as a subquery and test for the earliest date that the
Count(*) field (members) is below a certain number. However, once I use it
in a subquery I get an error on the date-time field that it is an
unsupported data type... any clues?
SELECT TermEndDate, Members
FROM (SELECT TOP (100) PERCENT TermEndDate, COUNT(*) AS Members
FROM Person_mm_Board AS P
WHERE (BoardID = @.BoardID)
GROUP BY TermEndDate
ORDER BY TermEndDate) AS SAre you making this too difficult? Perhaps this will do the same without err
or.
SELECT
TermEndDate
, count( Members )
FROM Person_mm_Board
WHERE BoardID = @.BoardID
GROUP BY TermEndDate
ORDER BY TermEndDate
--
Arnie Rowland*
"To be successful, your heart must accompany your knowledge."
"Ryan" <Tyveil@.newsgroups.nospam> wrote in message news:%237V2DKcpGHA.4760@.TK2MSFTNGP05.phx.
gbl...
>I have a query that returns 2 fields, a date-time field and a Count(*)
> field. Basically it tells me how many people exist for a specific date.
I
> want to use this as a subquery and test for the earliest date that the
> Count(*) field (members) is below a certain number. However, once I use i
t
> in a subquery I get an error on the date-time field that it is an
> unsupported data type... any clues?
>
> SELECT TermEndDate, Members
> FROM (SELECT TOP (100) PERCENT TermEndDate, COUNT(*) AS Member
s
> FROM Person_mm_Board AS P
> WHERE (BoardID = @.BoardID)
> GROUP BY TermEndDate
> ORDER BY TermEndDate) AS S
>
>|||Yes this will do the same thing. I'm not finished with the main query yet.
The end query will look something like below. Just trying to simplify thin
gs to find the source of the problem. The question remains - Why is the dat
etime field not showing up when used as a subquery? Thanks.
SELECT TOP(1) TermEndDate, Members
FROM (SELECT TOP (100) PERCENT TermEndDate, COUNT(*) AS Members,
BoardID
FROM Person_mm_Board AS P
WHERE (BoardID = @.BoardID)
GROUP BY TermEndDate
ORDER BY TermEndDate) AS S
INNER JOIN Board AS B
ON B.BoardID = S.BoardID
WHERE S.Members < B.Members
"Arnie Rowland" <arnie@.1568.com> wrote in message news:eVSMvOcpGHA.2400@.TK2M
SFTNGP03.phx.gbl...
Are you making this too difficult? Perhaps this will do the same without err
or.
SELECT
TermEndDate
, count( Members )
FROM Person_mm_Board
WHERE BoardID = @.BoardID
GROUP BY TermEndDate
ORDER BY TermEndDate
--
Arnie Rowland*
"To be successful, your heart must accompany your knowledge."
"Ryan" <Tyveil@.newsgroups.nospam> wrote in message news:%237V2DKcpGHA.4760@.TK2MSFTNGP05.phx.
gbl...
>I have a query that returns 2 fields, a date-time field and a Count(*)
> field. Basically it tells me how many people exist for a specific date.
I
> want to use this as a subquery and test for the earliest date that the
> Count(*) field (members) is below a certain number. However, once I use i
t
> in a subquery I get an error on the date-time field that it is an
> unsupported data type... any clues?
>
> SELECT TermEndDate, Members
> FROM (SELECT TOP (100) PERCENT TermEndDate, COUNT(*) AS Member
s
> FROM Person_mm_Board AS P
> WHERE (BoardID = @.BoardID)
> GROUP BY TermEndDate
> ORDER BY TermEndDate) AS S
>
>|||OK I cast the datetime field to varchar and then back to datetime in the mai
n query and it seems to work. Here's my final query.
SELECT TOP (1) S.Members, CAST(S.Expr1 AS datetime) AS TermEnd
FROM (SELECT TOP (100) PERCENT CAST(TermEndDate AS Varchar) AS E
xpr1, COUNT(*) AS Members, BoardID
FROM Person_mm_Board AS P
WHERE (BoardID = @.BoardID)
GROUP BY TermEndDate, BoardID
ORDER BY TermEndDate) AS S INNER JOIN
Board AS B ON S.BoardID = B.BoardID AND S.Members < B.NumberMembers
"Ryan" <Tyveil@.newsgroups.nospam> wrote in message news:OJ3MOdcpGHA.4548@.TK2
MSFTNGP03.phx.gbl...
Yes this will do the same thing. I'm not finished with the main query yet.
The end query will look something like below. Just trying to simplify thin
gs to find the source of the problem. The question remains - Why is the dat
etime field not showing up when used as a subquery? Thanks.
SELECT TOP(1) TermEndDate, Members
FROM (SELECT TOP (100) PERCENT TermEndDate, COUNT(*) AS Members,
BoardID
FROM Person_mm_Board AS P
WHERE (BoardID = @.BoardID)
GROUP BY TermEndDate
ORDER BY TermEndDate) AS S
INNER JOIN Board AS B
ON B.BoardID = S.BoardID
WHERE S.Members < B.Members
"Arnie Rowland" <arnie@.1568.com> wrote in message news:eVSMvOcpGHA.2400@.TK2M
SFTNGP03.phx.gbl...
Are you making this too difficult? Perhaps this will do the same without err
or.
SELECT
TermEndDate
, count( Members )
FROM Person_mm_Board
WHERE BoardID = @.BoardID
GROUP BY TermEndDate
ORDER BY TermEndDate
--
Arnie Rowland*
"To be successful, your heart must accompany your knowledge."
"Ryan" <Tyveil@.newsgroups.nospam> wrote in message news:%237V2DKcpGHA.4760@.TK2MSFTNGP05.phx.
gbl...
>I have a query that returns 2 fields, a date-time field and a Count(*)
> field. Basically it tells me how many people exist for a specific date.
I
> want to use this as a subquery and test for the earliest date that the
> Count(*) field (members) is below a certain number. However, once I use i
t
> in a subquery I get an error on the date-time field that it is an
> unsupported data type... any clues?
>
> SELECT TermEndDate, Members
> FROM (SELECT TOP (100) PERCENT TermEndDate, COUNT(*) AS Member
s
> FROM Person_mm_Board AS P
> WHERE (BoardID = @.BoardID)
> GROUP BY TermEndDate
> ORDER BY TermEndDate) AS S
>
>|||Just to clarify:
if you remove the parenthesis around the number 100 so that the code reads
... (SELECT TOP 100 PERCENT ...
your code is good to run.
"Ryan" <Tyveil@.newsgroups.nospam> wrote in message
news:%237V2DKcpGHA.4760@.TK2MSFTNGP05.phx.gbl...
>I have a query that returns 2 fields, a date-time field and a Count(*)
>field. Basically it tells me how many people exist for a specific date. I
>want to use this as a subquery and test for the earliest date that the
>Count(*) field (members) is below a certain number. However, once I use it
>in a subquery I get an error on the date-time field that it is an
>unsupported data type... any clues?
> SELECT TermEndDate, Members
> FROM (SELECT TOP (100) PERCENT TermEndDate, COUNT(*) AS
> Members
> FROM Person_mm_Board AS P
> WHERE (BoardID = @.BoardID)
> GROUP BY TermEndDate
> ORDER BY TermEndDate) AS S
>|||On Wed, 12 Jul 2006 09:48:39 -0500, Ryan wrote:

>I have a query that returns 2 fields, a date-time field and a Count(*)
>field. Basically it tells me how many people exist for a specific date. I
>want to use this as a subquery and test for the earliest date that the
>Count(*) field (members) is below a certain number. However, once I use it
>in a subquery I get an error on the date-time field that it is an
>unsupported data type... any clues?
Hi Ryan,
None at all. Datetime columns are allowed in subqueries. It might help
if could post the actual error message (use copy and paste to prevent
transcription errors). I'd also like to see the structure of the table
(posted as a CREATE TABLE statement).

>SELECT TermEndDate, Members
>FROM (SELECT TOP (100) PERCENT TermEndDate, COUNT(*) AS Members
> FROM Person_mm_Board AS P
> WHERE (BoardID = @.BoardID)
> GROUP BY TermEndDate
> ORDER BY TermEndDate) AS S
The ORDER BY and the TOP (100) PERCENT in the subquery are completely
useless. Get rid of them.
If you need the results to be ordered, put an ORDER BY clause on the
outer query:
SELECT TermEndDate, Members
FROM (SELECT TermEndDate, COUNT(*) AS Members
FROM Person_mm_Board AS P
WHERE BoardID = @.BoardID)
GROUP BY TermEndDate) AS S
ORDER BY TermEndDate
Hugo Kornelis, SQL Server MVP|||It still looks like you are making this too difficult.
Datetime fields work just fine in sub-queries.
Are you attempting to locate the next Board Member with term expiring?
Having a bit more detail about what you are working with (table DDL, sample
data, complete problem story) sure would make it easier to assist you. Witho
ut that, we are just playing twenty questions with you.
--
Arnie Rowland*
"To be successful, your heart must accompany your knowledge."
"Ryan" <Tyveil@.newsgroups.nospam> wrote in message news:OE5bfhcpGHA.756@.TK2M
SFTNGP05.phx.gbl...
OK I cast the datetime field to varchar and then back to datetime in the mai
n query and it seems to work. Here's my final query.
SELECT TOP (1) S.Members, CAST(S.Expr1 AS datetime) AS TermEnd
FROM (SELECT TOP (100) PERCENT CAST(TermEndDate AS Varchar) AS E
xpr1, COUNT(*) AS Members, BoardID
FROM Person_mm_Board AS P
WHERE (BoardID = @.BoardID)
GROUP BY TermEndDate, BoardID
ORDER BY TermEndDate) AS S INNER JOIN
Board AS B ON S.BoardID = B.BoardID AND S.Members < B.NumberMembers
"Ryan" <Tyveil@.newsgroups.nospam> wrote in message news:OJ3MOdcpGHA.4548@.TK2
MSFTNGP03.phx.gbl...
Yes this will do the same thing. I'm not finished with the main query yet.
The end query will look something like below. Just trying to simplify thin
gs to find the source of the problem. The question remains - Why is the dat
etime field not showing up when used as a subquery? Thanks.
SELECT TOP(1) TermEndDate, Members
FROM (SELECT TOP (100) PERCENT TermEndDate, COUNT(*) AS Members,
BoardID
FROM Person_mm_Board AS P
WHERE (BoardID = @.BoardID)
GROUP BY TermEndDate
ORDER BY TermEndDate) AS S
INNER JOIN Board AS B
ON B.BoardID = S.BoardID
WHERE S.Members < B.Members
"Arnie Rowland" <arnie@.1568.com> wrote in message news:eVSMvOcpGHA.2400@.TK2M
SFTNGP03.phx.gbl...
Are you making this too difficult? Perhaps this will do the same without err
or.
SELECT
TermEndDate
, count( Members )
FROM Person_mm_Board
WHERE BoardID = @.BoardID
GROUP BY TermEndDate
ORDER BY TermEndDate
--
Arnie Rowland*
"To be successful, your heart must accompany your knowledge."
"Ryan" <Tyveil@.newsgroups.nospam> wrote in message news:%237V2DKcpGHA.4760@.TK2MSFTNGP05.phx.
gbl...
>I have a query that returns 2 fields, a date-time field and a Count(*)
> field. Basically it tells me how many people exist for a specific date.
I
> want to use this as a subquery and test for the earliest date that the
> Count(*) field (members) is below a certain number. However, once I use i
t
> in a subquery I get an error on the date-time field that it is an
> unsupported data type... any clues?
>
> SELECT TermEndDate, Members
> FROM (SELECT TOP (100) PERCENT TermEndDate, COUNT(*) AS Member
s
> FROM Person_mm_Board AS P
> WHERE (BoardID = @.BoardID)
> GROUP BY TermEndDate
> ORDER BY TermEndDate) AS S
>
>

Date-time unsupported in subquery?

I have a query that returns 2 fields, a date-time field and a Count(*)
field. Basically it tells me how many people exist for a specific date. I
want to use this as a subquery and test for the earliest date that the
Count(*) field (members) is below a certain number. However, once I use it
in a subquery I get an error on the date-time field that it is an
unsupported data type... any clues?
SELECT TermEndDate, Members
FROM (SELECT TOP (100) PERCENT TermEndDate, COUNT(*) AS Members
FROM Person_mm_Board AS P
WHERE (BoardID = @.BoardID)
GROUP BY TermEndDate
ORDER BY TermEndDate) AS SThis is a multi-part message in MIME format.
--=_NextPart_000_0BC1_01C6A589.01BE9E50
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Are you making this too difficult? Perhaps this will do the same without =error.
SELECT
TermEndDate
, count( Members )
FROM Person_mm_Board
WHERE BoardID =3D @.BoardID
GROUP BY TermEndDate
ORDER BY TermEndDate
-- Arnie Rowland* "To be successful, your heart must accompany your knowledge."
"Ryan" <Tyveil@.newsgroups.nospam> wrote in message =news:%237V2DKcpGHA.4760@.TK2MSFTNGP05.phx.gbl...
>I have a query that returns 2 fields, a date-time field and a Count(*) > field. Basically it tells me how many people exist for a specific =date. I > want to use this as a subquery and test for the earliest date that the =
> Count(*) field (members) is below a certain number. However, once I =use it > in a subquery I get an error on the date-time field that it is an > unsupported data type... any clues?
> > SELECT TermEndDate, Members
> FROM (SELECT TOP (100) PERCENT TermEndDate, COUNT(*) AS =Members
> FROM Person_mm_Board AS P
> WHERE (BoardID =3D @.BoardID)
> GROUP BY TermEndDate
> ORDER BY TermEndDate) AS S > >
--=_NextPart_000_0BC1_01C6A589.01BE9E50
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

Are you making this too difficult? =Perhaps this will do the same without error.
SELECT TermEndDate , count( Members )FROM =Person_mm_BoardWHERE BoardID =3D @.BoardIDGROUP BY TermEndDateORDER BY =TermEndDate
-- Arnie Rowland* "To be =successful, your heart must accompany your knowledge."
"Ryan" wrote in message news:%237V2DKcpGHA.4760@.TK2MSFTNGP05.phx.gbl...>I =have a query that returns 2 fields, a date-time field and a Count(*) > =field. Basically it tells me how many people exist for a specific date. I => want to use this as a subquery and test for the earliest date =that the > Count(*) field (members) is below a certain number. =However, once I use it > in a subquery I get an error on the date-time field =that it is an > unsupported data type... any clues?> > SELECT TermEndDate, Members> FROM (SELECT TOP (100) PERCENT TermEndDate, COUNT(*) =AS Members> &nbs=p;  =; FROM =Person_mm_Board AS P> &nbs=p; WHERE (BoardID =3D @.BoardID)> &n=bsp; &nb=sp; GROUP BY TermEndDate> = &=nbsp; ORDER BY TermEndDate) AS S > >

--=_NextPart_000_0BC1_01C6A589.01BE9E50--|||This is a multi-part message in MIME format.
--=_NextPart_000_0033_01C6A59D.202C71F0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Yes this will do the same thing. I'm not finished with the main query =yet. The end query will look something like below. Just trying to =simplify things to find the source of the problem. The question remains =- Why is the datetime field not showing up when used as a subquery? =Thanks.
SELECT TOP(1) TermEndDate, Members
FROM (SELECT TOP (100) PERCENT TermEndDate, COUNT(*) AS =Members, BoardID
FROM Person_mm_Board AS P
WHERE (BoardID =3D @.BoardID)
GROUP BY TermEndDate
ORDER BY TermEndDate) AS S INNER JOIN Board AS B ON B.BoardID =3D S.BoardID
WHERE S.Members < B.Members "Arnie Rowland" <arnie@.1568.com> wrote in message =news:eVSMvOcpGHA.2400@.TK2MSFTNGP03.phx.gbl...
Are you making this too difficult? Perhaps this will do the same =without error.
SELECT
TermEndDate
, count( Members )
FROM Person_mm_Board
WHERE BoardID =3D @.BoardID
GROUP BY TermEndDate
ORDER BY TermEndDate
-- Arnie Rowland* "To be successful, your heart must accompany your knowledge."
"Ryan" <Tyveil@.newsgroups.nospam> wrote in message =news:%237V2DKcpGHA.4760@.TK2MSFTNGP05.phx.gbl...
>I have a query that returns 2 fields, a date-time field and a =Count(*) > field. Basically it tells me how many people exist for a specific =date. I > want to use this as a subquery and test for the earliest date that =the > Count(*) field (members) is below a certain number. However, once I =use it > in a subquery I get an error on the date-time field that it is an > unsupported data type... any clues?
> > SELECT TermEndDate, Members
> FROM (SELECT TOP (100) PERCENT TermEndDate, COUNT(*) AS =Members
> FROM Person_mm_Board AS P
> WHERE (BoardID =3D @.BoardID)
> GROUP BY TermEndDate
> ORDER BY TermEndDate) AS S > >
--=_NextPart_000_0033_01C6A59D.202C71F0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

Yes this will do the same thing. =I'm not finished with the main query yet. The end query will look =something like below. Just trying to simplify things to find the source of the problem. The question remains - Why is the datetime field not =showing up when used as a subquery? Thanks.
SELECT TOP(1) TermEndDate, MembersFROM (SELECT TOP (100) PERCENT TermEndDate, COUNT(*) =AS Members, BoardID &n=bsp; FROM =Person_mm_Board AS P &n=bsp; WHERE (BoardID =3D @.BoardID) = =GROUP BY TermEndDate &nbs=p;  =; ORDER BY TermEndDate) AS S
INNER JOIN Board AS B
ON B.BoardID =3D S.BoardID
WHERE S.Members < B.Members
"Arnie Rowland" wrote in message =news:eVSMvOcpGHA.2400=@.TK2MSFTNGP03.phx.gbl...
Are you making this too difficult? =Perhaps this will do the same without error.

SELECT TermEndDate , count( Members )FROM Person_mm_BoardWHERE BoardID =3D @.BoardIDGROUP BY =TermEndDateORDER BY TermEndDate

-- Arnie Rowland* "To be =successful, your heart must accompany your knowledge."


"Ryan" wrote in message news:%237V2DKcpGHA.4760@.TK2MSFTNGP05.phx.gbl...>I have a query that returns 2 fields, a date-time field and a Count(*) > =field. Basically it tells me how many people exist for a specific date. =I > want to use this as a subquery and test for the earliest date =that the > Count(*) field (members) is below a certain number. = However, once I use it > in a subquery I get an error on the =date-time field that it is an > unsupported data type... any =clues?> > SELECT TermEndDate, Members> FROM (SELECT TOP (100) PERCENT TermEndDate, =COUNT(*) AS =Members> &nbs=p;  =; FROM =Person_mm_Board AS =P> &nbs=p; WHERE (BoardID =3D =@.BoardID)> &n=bsp; &nb=sp; GROUP BY =TermEndDate> = &=nbsp; ORDER BY TermEndDate) AS S > > =

--=_NextPart_000_0033_01C6A59D.202C71F0--|||This is a multi-part message in MIME format.
--=_NextPart_000_004C_01C6A59E.30B9DA20
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
OK I cast the datetime field to varchar and then back to datetime in the =main query and it seems to work. Here's my final query.
SELECT TOP (1) S.Members, CAST(S.Expr1 AS datetime) AS TermEnd
FROM (SELECT TOP (100) PERCENT CAST(TermEndDate AS Varchar) =AS Expr1, COUNT(*) AS Members, BoardID
FROM Person_mm_Board AS P
WHERE (BoardID =3D @.BoardID)
GROUP BY TermEndDate, BoardID
ORDER BY TermEndDate) AS S INNER JOIN
Board AS B ON S.BoardID =3D B.BoardID AND =S.Members < B.NumberMembers
"Ryan" <Tyveil@.newsgroups.nospam> wrote in message =news:OJ3MOdcpGHA.4548@.TK2MSFTNGP03.phx.gbl...
Yes this will do the same thing. I'm not finished with the main query =yet. The end query will look something like below. Just trying to =simplify things to find the source of the problem. The question remains =- Why is the datetime field not showing up when used as a subquery? =Thanks.
SELECT TOP(1) TermEndDate, Members
FROM (SELECT TOP (100) PERCENT TermEndDate, COUNT(*) AS =Members, BoardID
FROM Person_mm_Board AS P
WHERE (BoardID =3D @.BoardID)
GROUP BY TermEndDate
ORDER BY TermEndDate) AS S INNER JOIN Board AS B ON B.BoardID =3D S.BoardID
WHERE S.Members < B.Members "Arnie Rowland" <arnie@.1568.com> wrote in message =news:eVSMvOcpGHA.2400@.TK2MSFTNGP03.phx.gbl...
Are you making this too difficult? Perhaps this will do the same =without error.
SELECT
TermEndDate
, count( Members )
FROM Person_mm_Board
WHERE BoardID =3D @.BoardID
GROUP BY TermEndDate
ORDER BY TermEndDate
-- Arnie Rowland* "To be successful, your heart must accompany your knowledge."
"Ryan" <Tyveil@.newsgroups.nospam> wrote in message =news:%237V2DKcpGHA.4760@.TK2MSFTNGP05.phx.gbl...
>I have a query that returns 2 fields, a date-time field and a =Count(*) > field. Basically it tells me how many people exist for a specific =date. I > want to use this as a subquery and test for the earliest date that =the > Count(*) field (members) is below a certain number. However, once =I use it > in a subquery I get an error on the date-time field that it is an > unsupported data type... any clues?
> > SELECT TermEndDate, Members
> FROM (SELECT TOP (100) PERCENT TermEndDate, COUNT(*) =AS Members
> FROM Person_mm_Board AS P
> WHERE (BoardID =3D @.BoardID)
> GROUP BY TermEndDate
> ORDER BY TermEndDate) AS S > >
--=_NextPart_000_004C_01C6A59E.30B9DA20
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

OK I cast the datetime field to varchar =and then back to datetime in the main query and it seems to work. Here's my =final query.
SELECT TOP (1) =S.Members, CAST(S.Expr1 AS datetime) AS TermEndFROM (SELECT TOP (100) PERCENT CAST(TermEndDate AS =Varchar) AS Expr1, COUNT(*) AS Members, BoardID &n=bsp; FROM =Person_mm_Board AS P &n=bsp; WHERE (BoardID =3D @.BoardID) = =GROUP BY TermEndDate, BoardID &n=bsp; ORDER BY TermEndDate) AS S INNER JOIN  =; Board AS B ON S.BoardID =3D B.BoardID AND S.Members < B.NumberMembers
"Ryan" = wrote in message news:OJ3MOdcpGHA.4548=@.TK2MSFTNGP03.phx.gbl...
Yes this will do the same =thing. I'm not finished with the main query yet. The end query will look =something like below. Just trying to simplify things to find the source of the problem. The question remains - Why is the datetime field not =showing up when used as a subquery? Thanks.

SELECT TOP(1) TermEndDate, MembersFROM (SELECT TOP (100) PERCENT TermEndDate, =COUNT(*) AS Members, =BoardID &n=bsp; FROM =Person_mm_Board AS =P &n=bsp; WHERE (BoardID =3D =@.BoardID) = = GROUP BY =TermEndDate &nbs=p;  =; ORDER BY TermEndDate) AS S
INNER JOIN Board AS B
ON B.BoardID =3D S.BoardID
WHERE S.Members < B.Members
"Arnie Rowland" wrote in =message news:eVSMvOcpGHA.2400=@.TK2MSFTNGP03.phx.gbl...
Are you making this too difficult? =Perhaps this will do the same without error.

SELECT TermEndDate , count( Members )FROM Person_mm_BoardWHERE BoardID =3D @.BoardIDGROUP BY =TermEndDateORDER BY TermEndDate

-- Arnie Rowland* "To =be successful, your heart must accompany your knowledge."


"Ryan" wrote in message news:%237V2DKcpGHA.4760@.TK2MSFTNGP05.phx.gbl...>I have a query that returns 2 fields, a date-time field and a Count(*) > field. Basically it tells me how many people exist for a =specific date. I > want to use this as a subquery and test for =the earliest date that the > Count(*) field (members) is below a =certain number. However, once I use it > in a subquery I get an =error on the date-time field that it is an > unsupported data =type... any clues?> > SELECT =TermEndDate, Members> FROM = (SELECT TOP (100) PERCENT TermEndDate, =COUNT(*) AS =Members> &nbs=p;  =; FROM =Person_mm_Board AS =P> &nbs=p; WHERE (BoardID =3D =@.BoardID)> &n=bsp; &nb=sp; GROUP BY =TermEndDate> = &=nbsp; ORDER BY TermEndDate) AS S > >

--=_NextPart_000_004C_01C6A59E.30B9DA20--|||Just to clarify:
if you remove the parenthesis around the number 100 so that the code reads
... (SELECT TOP 100 PERCENT ...
your code is good to run.
"Ryan" <Tyveil@.newsgroups.nospam> wrote in message
news:%237V2DKcpGHA.4760@.TK2MSFTNGP05.phx.gbl...
>I have a query that returns 2 fields, a date-time field and a Count(*)
>field. Basically it tells me how many people exist for a specific date. I
>want to use this as a subquery and test for the earliest date that the
>Count(*) field (members) is below a certain number. However, once I use it
>in a subquery I get an error on the date-time field that it is an
>unsupported data type... any clues?
> SELECT TermEndDate, Members
> FROM (SELECT TOP (100) PERCENT TermEndDate, COUNT(*) AS
> Members
> FROM Person_mm_Board AS P
> WHERE (BoardID = @.BoardID)
> GROUP BY TermEndDate
> ORDER BY TermEndDate) AS S
>|||On Wed, 12 Jul 2006 09:48:39 -0500, Ryan wrote:
>I have a query that returns 2 fields, a date-time field and a Count(*)
>field. Basically it tells me how many people exist for a specific date. I
>want to use this as a subquery and test for the earliest date that the
>Count(*) field (members) is below a certain number. However, once I use it
>in a subquery I get an error on the date-time field that it is an
>unsupported data type... any clues?
Hi Ryan,
None at all. Datetime columns are allowed in subqueries. It might help
if could post the actual error message (use copy and paste to prevent
transcription errors). I'd also like to see the structure of the table
(posted as a CREATE TABLE statement).
>SELECT TermEndDate, Members
>FROM (SELECT TOP (100) PERCENT TermEndDate, COUNT(*) AS Members
> FROM Person_mm_Board AS P
> WHERE (BoardID = @.BoardID)
> GROUP BY TermEndDate
> ORDER BY TermEndDate) AS S
The ORDER BY and the TOP (100) PERCENT in the subquery are completely
useless. Get rid of them.
If you need the results to be ordered, put an ORDER BY clause on the
outer query:
SELECT TermEndDate, Members
FROM (SELECT TermEndDate, COUNT(*) AS Members
FROM Person_mm_Board AS P
WHERE BoardID = @.BoardID)
GROUP BY TermEndDate) AS S
ORDER BY TermEndDate
Hugo Kornelis, SQL Server MVP|||This is a multi-part message in MIME format.
--=_NextPart_000_0C84_01C6A5D2.9A8AF130
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
It still looks like you are making this too difficult.
Datetime fields work just fine in sub-queries.
Are you attempting to locate the next Board Member with term expiring?
Having a bit more detail about what you are working with (table DDL, =sample data, complete problem story) sure would make it easier to assist =you. Without that, we are just playing twenty questions with you.
-- Arnie Rowland* "To be successful, your heart must accompany your knowledge."
"Ryan" <Tyveil@.newsgroups.nospam> wrote in message =news:OE5bfhcpGHA.756@.TK2MSFTNGP05.phx.gbl...
OK I cast the datetime field to varchar and then back to datetime in =the main query and it seems to work. Here's my final query.
SELECT TOP (1) S.Members, CAST(S.Expr1 AS datetime) AS TermEnd
FROM (SELECT TOP (100) PERCENT CAST(TermEndDate AS =Varchar) AS Expr1, COUNT(*) AS Members, BoardID
FROM Person_mm_Board AS P
WHERE (BoardID =3D @.BoardID)
GROUP BY TermEndDate, BoardID
ORDER BY TermEndDate) AS S INNER JOIN
Board AS B ON S.BoardID =3D B.BoardID AND =S.Members < B.NumberMembers
"Ryan" <Tyveil@.newsgroups.nospam> wrote in message =news:OJ3MOdcpGHA.4548@.TK2MSFTNGP03.phx.gbl...
Yes this will do the same thing. I'm not finished with the main =query yet. The end query will look something like below. Just trying =to simplify things to find the source of the problem. The question =remains - Why is the datetime field not showing up when used as a =subquery? Thanks.
SELECT TOP(1) TermEndDate, Members
FROM (SELECT TOP (100) PERCENT TermEndDate, COUNT(*) AS =Members, BoardID
FROM Person_mm_Board AS P
WHERE (BoardID =3D @.BoardID)
GROUP BY TermEndDate
ORDER BY TermEndDate) AS S INNER JOIN Board AS B ON B.BoardID =3D S.BoardID
WHERE S.Members < B.Members "Arnie Rowland" <arnie@.1568.com> wrote in message =news:eVSMvOcpGHA.2400@.TK2MSFTNGP03.phx.gbl...
Are you making this too difficult? Perhaps this will do the same =without error.
SELECT
TermEndDate
, count( Members )
FROM Person_mm_Board
WHERE BoardID =3D @.BoardID
GROUP BY TermEndDate
ORDER BY TermEndDate
-- Arnie Rowland* "To be successful, your heart must accompany your knowledge."
"Ryan" <Tyveil@.newsgroups.nospam> wrote in message =news:%237V2DKcpGHA.4760@.TK2MSFTNGP05.phx.gbl...
>I have a query that returns 2 fields, a date-time field and a =Count(*) > field. Basically it tells me how many people exist for a =specific date. I > want to use this as a subquery and test for the earliest date =that the > Count(*) field (members) is below a certain number. However, =once I use it > in a subquery I get an error on the date-time field that it is =an > unsupported data type... any clues?
> > SELECT TermEndDate, Members
> FROM (SELECT TOP (100) PERCENT TermEndDate, COUNT(*) =AS Members
> FROM Person_mm_Board AS P
> WHERE (BoardID =3D @.BoardID)
> GROUP BY TermEndDate
> ORDER BY TermEndDate) AS S > >
--=_NextPart_000_0C84_01C6A5D2.9A8AF130
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

It still looks like you are making this =too difficult.
Datetime fields work just fine in sub-queries.
Are you attempting to locate the next =Board Member with term expiring?
Having a bit more detail about what you =are working with (table DDL, sample data, complete problem story) sure would make it =easier to assist you. Without that, we are just playing twenty questions with =you.
-- Arnie Rowland* "To be successful, your heart must =accompany your knowledge."
"Ryan" = wrote in message news:OE5bfhcpGHA.756@.T=K2MSFTNGP05.phx.gbl...
OK I cast the datetime field to =varchar and then back to datetime in the main query and it seems to work. Here's =my final query.

SELECT TOP =(1) S.Members, CAST(S.Expr1 AS datetime) AS TermEndFROM (SELECT TOP (100) PERCENT CAST(TermEndDate AS =Varchar) AS Expr1, COUNT(*) AS Members, =BoardID &n=bsp; FROM =Person_mm_Board AS =P &n=bsp; WHERE (BoardID =3D =@.BoardID) = = GROUP BY TermEndDate, =BoardID &n=bsp; ORDER BY TermEndDate) AS S INNER =JOIN  =; Board AS B ON S.BoardID =3D B.BoardID AND S.Members < B.NumberMembers
"Ryan" = wrote in message news:OJ3MOdcpGHA.4548=@.TK2MSFTNGP03.phx.gbl...
Yes this will do the same =thing. I'm not finished with the main query yet. The end query will look =something like below. Just trying to simplify things to find the source =of the problem. The question remains - Why is the datetime field not =showing up when used as a subquery? Thanks.

SELECT TOP(1) TermEndDate, MembersFROM (SELECT TOP (100) PERCENT TermEndDate, =COUNT(*) AS Members, =BoardID &n=bsp; FROM =Person_mm_Board AS =P &n=bsp; WHERE (BoardID =3D =@.BoardID) = = GROUP BY =TermEndDate &nbs=p;  =; ORDER BY TermEndDate) AS S
INNER JOIN Board AS B
ON B.BoardID =3D S.BoardID
WHERE S.Members < B.Members
"Arnie Rowland" wrote in =message news:eVSMvOcpGHA.2400=@.TK2MSFTNGP03.phx.gbl...
Are you making this too =difficult? Perhaps this will do the same without error.

SELECT TermEndDate , count( Members )FROM Person_mm_BoardWHERE BoardID =3D @.BoardIDGROUP BY TermEndDateORDER BY TermEndDate

-- Arnie Rowland* "To =be successful, your heart must accompany your =knowledge."


"Ryan" wrote in message news:%237V2DKcpGHA.4760@.TK2MSFTNGP05.phx.gbl...>I have a query that returns 2 fields, a date-time field and a Count(*) => field. Basically it tells me how many people exist for a =specific date. I > want to use this as a subquery and test for =the earliest date that the > Count(*) field (members) is below =a certain number. However, once I use it > in a =subquery I get an error on the date-time field that it is an > unsupported =data type... any clues?> > =SELECT TermEndDate, Members> FROM (SELECT TOP (100) PERCENT TermEndDate, =COUNT(*) AS =Members> &nbs=p;  =; FROM =Person_mm_Board AS =P> &nbs=p; WHERE (BoardID =3D =@.BoardID)> &n=bsp; &nb=sp; GROUP BY =TermEndDate> = &=nbsp; ORDER BY TermEndDate) AS S > >

--=_NextPart_000_0C84_01C6A5D2.9A8AF130--

Wednesday, March 21, 2012

DateTime Ranges

Hi..
I am facing a problem trying to determine whether a point in tie falls within a specific date and time range.
Here is an example..
Is 7/20/2007 1:23:45PM in the range between (Thursday 8:00 PM) To (Sunday 7:59 AM)
ThanksI've not got Crystal on this PC, so excuse any errors, but I'd expect you could do something like

numbervar d := dayofweek({date}); //or whatever the 'get day' function is!
timevar t := ctime({date}); //Get just the time part

//return whether between Thursday 8pm and Sunday 8pm
(d = CrThursday and t >= ctime(20, 0, 0))
or d = CrFriday
or d = CrSaturday
or (d = CrSunday and t < ctime(20, 0, 0))|||Thanks my friend,

I used your CRsyntax and converted it to Basic as follows:

Dim d As number
Dim t AS time

d= dayofweek(currentdatetime)
t= ctime(currentdatetime)

'return whether between Thursday 8pm and Sunday 8pm
IF (d = CrThursday and t >= ctime(20, 0, 0)) or d = CrFriday or d = CrSaturday or (d = CrSunday and t < ctime(8, 0, 0)) THEN
FORMULA= "Code if True"
Else
FORMULA= "Code if False"
END IF

Sunday, March 11, 2012

DateTime format in Report manager (parameter)

Hi,
I would like the report manager to accept datetime parameters in a specific
format (European). I've set the report settings to the correct language, and
parameter input in the visual studio report designer works like it should.
But after deploying the reports, the way the datetime parameter has to be
inputted changed from European (dd/mm/yyyy) to US format (mm/dd/yyyy). The
dates on the report itself are shown correctly.
Is there a way to tell the report manager which datetime format it should use?
thx!
--
AndreasThe date format will be based on the locale requested by the client browser.
--
Brian Welcker
Group Program Manager
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Andreas" <Andreas@.discussions.microsoft.com> wrote in message
news:1A293983-0517-46C4-9A70-153B59DB47F3@.microsoft.com...
> Hi,
> I would like the report manager to accept datetime parameters in a
> specific
> format (European). I've set the report settings to the correct language,
> and
> parameter input in the visual studio report designer works like it should.
> But after deploying the reports, the way the datetime parameter has to be
> inputted changed from European (dd/mm/yyyy) to US format (mm/dd/yyyy). The
> dates on the report itself are shown correctly.
> Is there a way to tell the report manager which datetime format it should
> use?
> thx!
> --
> Andreas