Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Last 2 minutes Data
Message
From
22/01/2019 03:30:28
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
 
 
To
22/01/2019 02:59:16
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01665598
Message ID:
01665600
Views:
75
>Sir while using sqlserver 2008, I have this data
>
>
>
>Suppose current time is
>
>2019-01-22 10:33:00
>
>I want to get Data of last 2 MINUTES as
>
>15 2019-01-22 10:31:46.287 25
>16 2019-01-22 10:32:13.677 35
>
>I used these codes
>
>
>
>
>but it is showing wrong result.
>
>
>Please

I'm not into SQL Server but I guess your logic is the wrong way

The time you search is larger then 2 minutes ago. So in VFP pseudocode
SELECT .. WHERE dDateTime>DATETIME()-120
Pro tip:
Do not be that lazy and paste sceeenshots. Add code snippets out of characters.
I can't look into pictures while doing the reply, nor can I copy it.


Lutz
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Previous
Reply
Map
View

Click here to load this message in the networking platform