Re: datetime to date?
From: Fred Taylor (ftaylor_at_mvps.org!REMOVE)
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" <email@example.com> wrote in message news:ukPrC1rDFHA.firstname.lastname@example.org... > Function dtot(aDateTimeField) should return a date part out of a datetime > field type. > > HTH, > > "Rutko" <email@example.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. >> >> > >