Re: datetime to date?

From: Fred Taylor (ftaylor_at_mvps.org!REMOVE)
Date: 02/10/05


Date: Wed, 9 Feb 2005 22:00:25 -0700

No, that would be TTOD(aDateTimeField) to get just the date portion.
DTOT(aDateField) would yield a datetime value from a date.

But since you're trying to retrieve this value from essentially SQL server
(or MSDE), the above won't work with SQL Pass Through (SPT), that must be in
the syntax that the backend expects. You could create a remote view that
does the conversion for you.

-- 
Fred
Microsoft Visual FoxPro MVP
"Newbie" <admin@indohomeware.com> wrote in message 
news:ukPrC1rDFHA.1836@tk2msftngp13.phx.gbl...
> Function dtot(aDateTimeField) should return a date part out of a datetime
> field type.
>
> HTH,
>
> "Rutko" <rutko22001@yahoo.com> wrote in message
> news:eZs0VVjBFHA.3596@TK2MSFTNGP12.phx.gbl...
>> When I send a query 'SELECT somedatecolumn FROM....' I got resultset
>> containing datetime. It's ok because it is a datetime field (or
>> smalldatetime) but it is a little frustrating because I'm interested only
> in
>> date. Is it possible to get only a date, without the time? My previous
>> database was in Visual FoxPro and there I had date columns but on MSDE or
>> MSSQL it seems I only can have datetime or smalldatetime.
>>
>> Thx.
>>
>>
>
> 


Relevant Pages

  • Re: datetime to date?
    ... Function dtot(aDateTimeField) should return a date part out of a datetime ... field type. ... HTH, ... > MSSQL it seems I only can have datetime or smalldatetime. ...
    (microsoft.public.fox.vfp.queries-sql)
  • Re: Date Problems - ASP/SQL
    ... a DATETIME column does NOT store DD/MM/YYYY format. ... DECLARE @dt SMALLDATETIME ... data> type to a datetime data type resulted in an out-of-range datetime value. ...
    (microsoft.public.inetserver.asp.general)
  • Re: convert datetime to smalldatetime
    ... CREATE TABLE Source(col1 Datetime) ... CREATE TABLE Destination(col1 smalldatetime) ... www.SQLDTS.com - The site for all your DTS needs. ... > I am wondering if anyone can tell me how to convert a datetime field to ...
    (microsoft.public.sqlserver.dts)
  • Re: DTS handling bad dates
    ... prespective if I change it from smalldatetime to datetime. ... Datetime goes to year 9999. ... "robboll" wrote: ... DTS job fails with the error: ...
    (microsoft.public.sqlserver.dts)
  • Re: Problems with DateTime field and PK
    ... It looks like your target column datatype is smalldatetime. ... type to datetime. ... I keep getting an error relating to duplicate records. ...
    (microsoft.public.sqlserver.programming)