Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using Today as a paramter default 1

Status
Not open for further replies.

smartglass

IS-IT--Management
Mar 14, 2006
33
GB
Hi there:
I am trying to write a VFP routine that pulls from MSSQL orders processed today.
Is there any way of defining 'today' as a default parameter in the view?
Also the parameters I use for a similar process elsewhere prompt for a date - which is American style MM/DD/YY. Is it possible for vfp to allow UK style entering of date -eg 13/07/06, recognised by the view as US style 07/13/06?

Thanks from a Brit!
 
Hi Smarglass,

Is there any way of defining 'today' as a default parameter in the view?

Use GETDATE() in your WHERE clause. This is equivalent to VFP's DATETIME().

Be aware that dates in SQL Server are in fact stored as datetimes.

Also the parameters I use for a similar process elsewhere prompt for a date - which is American style MM/DD/YY. Is it possible for vfp to allow UK style entering of date

Not sure exactly what you mean. Issuing SET DATEFORMAT dmy tells SQL Server to interpret date literals in standard format (as opposed to American). Does that help?

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top