Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL datetime --> VFP date in a query
Message
De
11/03/2002 11:59:00
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00630844
Message ID:
00631044
Vues:
21
Hi,
We have had a similar problem and have created a SQL Server User Written Function that we refer to as a sql FUNCTION whenever the date only is required:

CREATE FUNCTION dbo.xfn__DateOnly (@vcDateTime datetime)
RETURNS VarChar(10)
WITH SCHEMABINDING
AS
BEGIN
RETURN CONVERT(VarChar(12), @vcDateTime, 101)
END
-----------
The above code creates the function in the local Database User Defined Function area as XFN__DateOnly (with source code). We then move the compiled function into the Master UDF as fn__DateOnly (without sourcecode).

Then in a SQL Stored Procedure
SELECT vcTransNoIN, dtIssuedIN = FN__DATEONLY(dtIssuedIN), etc.....

I hope this helps?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform