Home > Back-end >  Delphi access SQL query time I accurate machine, other machine have no ~?
Delphi access SQL query time I accurate machine, other machine have no ~?

Time:10-04

The following

Select sum (mint1) as aaa from message where msenttime & gt; "' 2014-04-10 00:00:00 'and msenttime & lt; 'the 2014-04-10 23:59:59 "'

I develop the use of computers can be find out the correct number, but the package sent to another client computer cannot be executed. Why is this??

Msenttime time fields. Msenttime & gt; # # 2014-04-10 00:00:00 these writing were used.

I machine lines, on the other computer is not.?

CodePudding user response:

Use string msenttime & gt; '2014-04-10 00:00:00'

CodePudding user response:

What do you use the database?
The access is to use # #;
MSSQL: if connected to the same server, and should not be your problem; If the client server machines do, you will need to pay attention to whether the date separator '-', the default is'/', you need to set into a '-'

CodePudding user response:

The
reference 1/f, unearth response:
with string msenttime & gt; '2014-04-10 00:00:00


Have tried. This query no problem in my computer, to other people's computer have a problem. The database is a content. Is a time for conditions not recognise. Remove time is data.

Time field is data.

CodePudding user response:

refer to the second floor jenhon response:
what do you use the database?
The access is to use # #;
MSSQL: if connected to the same server, and should not be your problem; If the client server machines do, you will need to pay attention to whether the date separator '-', the default is'/', you need to set into a '-'


I use the access data library.. Others machine are not, I was the only machine. Isn't owe what not installed or something?

CodePudding user response:

You're not supposed to or not?
Look at others machine time date set, whether accord with you?
May be you use is YYYY - - DD hh: MM MM: ss
Others use YYYY/MM/DD hh: MM: ss

CodePudding user response:

Quote: refer to the fifth floor SmallHand reply:

You're not supposed to or not?
Look at others machine time date set, whether accord with you?
May be you use is YYYY - - DD hh: MM MM: ss
Others use YYYY/MM/DD hh: MM: ss [/quote}

Records of the day there is. Is the other people did not find this time. Time is the same, the exact time. Then./I have to replace on time -

~

CodePudding user response:

# 1, access to use set of time;
2, access to use SQL statements, the use of ginseng, in some cases deviation is 2 days, you are on the client, extended the date range and see how much offset, suggest using SQL statements character combinations,
  • Related