Re: datepart + dateadd



Thanks. I'm still not doing something right. Here is what i have:

SELECT dbo.tblChild.FName, dbo.tblChild.LName,
dbo.tblChild.Birthday
FROM dbo.tblChild
WHERE
(CAST(CONVERT(nchar(2), DATEPART(month, dbo.tblChild.Birthday), 0) +
N'/' +
CONVERT(nchar(2), DATEPART(day, dbo.tblChild.Birthday), 0) + N'/' +
CONVERT(nchar(4), DATEPART(year, GETDATE()), 0) AS datetime)
BETWEEN DATEADD(d, 21, GETDATE()) AND DATEADD(d, 28, GETDATE()))

Any ideas? I keep getting an error message that says something about
arithmetic overflow.

.



Relevant Pages

  • Re: SQL Query
    ... This does not work on GETDATE() ... declare @date datetime, @workingdate datetime ... SELECT Date_Created, COUNTFROM #Temp ... I need to count the number of records on a Day in SQL Server ...
    (microsoft.public.dotnet.framework)
  • Re: Formatting datetime when including in a PRINT command etc...
    ... As getdate() returns a datetime I am forced to cast or convert to make ... I'm trying to format a print string so that it reports progress whilst ... I want the datetime to print out down to the fraction of a second. ...
    (comp.databases.ms-sqlserver)
  • Re: Insert Current Time of SQL server to database thr ASP.net
    ... You'd do it in your database. ... Just set the default value for your datetime column to getdate() ... > time of the web server to the DateTimeField, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: DATETIME Default getDate() query
    ... One of the columns retrieves the date which a ... >Is this to do with the DATETIME Default getDate() code for creating the ... >I'm using a microsoft SQL server. ...
    (microsoft.public.sqlserver.clients)
  • Tarfile module error
    ... When executing this daily backup scripts I ... import tarfile ... from datetime import datetime ... From the error message I gues the library is ...
    (comp.lang.python)