Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP 6.0(SP3) AND SQL6.5
Message
 
 
À
10/11/2000 02:15:44
Fida Shamsoodeen
Combined Systems (Pty) Ltd
Centurion, Afrique du Sud
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00439595
Message ID:
00440098
Vues:
13
Hmm, I tried this for SQL Server 7.0. Did not thought that this so different for 6.5 version. Sorry.

>Hi Vlad
>
>Thanks for the suggestion. I cannot get it to work with your syntax.
>I have tried the following one and this one seem to work fine :
>
>date.depdate = '31/01/2000'
>SELECT CONVERT(char(10), DATEADD(month,1,date),103) from DEPDATE
>the above syntax returns the desired result which is
>'29/02/2000'
>
>Thanks
>Fida
>
>
>>Hi!
>>
>>Following expression probably will help you. The main idea is the same, but you need to use other functions on SQL server:
>>
>>dateadd(dd,-1,dateadd(mm,1,'10/01/2000'))
>>
>>returns 2000-10-31 - last day of the 10-th month.
>>
>>
>>>Hi All
>>>
>>>Can anyone please help with this one :
>>>
>>>In my VFP front-end and back-end i use this syntax to get to the end of a month
>>>
>>>depdate.date = "31/01/2000"
>>>endmonth = gomonth(depdate.date - day(depdate.date)+1,2) -1
>>>
>>>this works fine in VFP
>>>but with a SQL 6.5 back-end the depdate.date field is a date time field and with the above syntax it adds 1 second to this field and not 1 month.
>>>
>>>I have my date set as SET DATE BRIT
>>>and SET CENTURY ON
>>>and i am using views in this case
>>>
>>>Any suggestions??
>>>
>>>Thanks in advance
>>>Fida
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform