Re: datepart + dateadd

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

SELECT dbo.tblChild.FName, dbo.tblChild.LName,
FROM dbo.tblChild
(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)

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 ...
  • 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. ...
  • Re: Insert Current Time of SQL server to database thr
    ... 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, ...
  • 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. ...
  • 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 ...