fic code whenever possible unless
> >> said database specific code provides a not insignificant performance
> >> advantage. I suspect GetDate() vs. Now() is pretty insignificant.
> >
> > Well, actually, I'd recommend the exact opposite in many cases. It's a
>
gnificant performance
>> advantage. I suspect GetDate() vs. Now() is pretty insignificant.
>
> Well, actually, I'd recommend the exact opposite in many cases. It's a
> good thing to centralize time management wherever possible, and you're
> typically going to have a sing
> Now() is also database independent, which is generally a good thing
> IMO =) Avoid using database-specific code whenever possible unless
> said database specific code provides a not insignificant performance
> advantage. I suspect GetDate() vs. Now() is pretty insignificant.
We
Now() is also database independent, which is generally a good thing
IMO =) Avoid using database-specific code whenever possible unless
said database specific code provides a not insignificant performance
advantage. I suspect GetDate() vs. Now() is pretty insignificant.
Rick
> actually, if i read the law right here, each box on a
> network has to point to
> the official thai gov time server (w/the royal thai navy)
> itself. the fines are
> pretty substantial though never actually heard of anybody
> getting busted for it
> yet. in thailand, NTP servers aren't just a
On 5/19/2010 11:37 PM, Dave Watts wrote:
> OK, that's just crazy. Funny, but crazy. I'd like to see the
> enforcement protocol for that!
most IT departments don't have APC ;-)
~|
Order the Adobe Coldfusion Anthology now!
http://
> actually, if i read the law right here, each box on a network has to point to
> the official thai gov time server (w/the royal thai navy) itself. the fines
> are
> pretty substantial though never actually heard of anybody getting busted for
> it
> yet. in thailand, NTP servers aren't just a go
m in sync with the rest of
>the world.
>
>
>-Justin
Checked the diff between the two servers, and it matches the diff between now()
and getDate(), so that's it. Thanks!
-Sean
~|
Order the Adobe Coldfusion Anthology
On 5/19/2010 11:05 AM, Dave Watts wrote:
> server or domain controller (in a Windows-only environment) and have
> your other servers use this, instead of having each server go out to a
> public NTP server. Honestly, often it doesn't matter whether your
actually, if i read the law right here, each
>> Over the past few years the drift between now() and getDate() has grown
>> to almost 10 minutes. Using CFMX6.1 (J2RE 4_2_11), Win2K3 and SQL2K.
>
> use an NTP timeserver for *all* your servers. if in the US try
> http://www.time.gov/
Yes. And to elaborate a bit on this,
On 5/19/2010 3:56 AM, Sean N Henderson wrote:
>
> Over the past few years the drift between now() and getDate() has grown
> to almost 10 minutes. Using CFMX6.1 (J2RE 4_2_11), Win2K3 and SQL2K.
use an NTP timeserver for *all* your servers. if in the US try
http://www
> My assumption is any difference between the two
> would be the result of the two server's clocks
> not being in sync.
I concur with that assessment. If you have access, I'd recommend setting
the servers to use an NTP time server to keep them in sync with the rest of
the world.
-Justin
~~~
Now() polls the server running CF system's clock time, getDate() does the
same except on the box that hosts the SQL Server. My assumption is any
difference between the two would be the result of the two server's clocks
not being in sync. This can happen if the servers do not make use of
Over the past few years the drift between now() and getDate() has grown
to almost 10 minutes. Using CFMX6.1 (J2RE 4_2_11), Win2K3 and SQL2K.
What's the tweak/fix or where should I look? (Besides upgrading to newer
software stack)
Have poured over the CF Admin and Enterprise Manager
Its probably because in SQLServer getDate() returns a full date with
time information down to the millisecond.
Depending on how accurate your dates are this might be a simple fix:
dateAdded BETWEEN getDate()-1 and getDate()
Cheers,
Sam F
On 3/6/06, Richard Cooper <[EMAIL PROTECTED]>
Well getDate() is an SQL server function, so what error do you get ?
If you simply mean the doesn't return data, then it could be because the
comparison is not matching, i.e.
Dateadded = 12/01/2006
GetDate = 12/01/2005 09:46:00
Which would never be equal.
Russ
-Original Me
s
> WHERE active = '1'
> AND eventID = '#theEventID#'
> AND dateAdded = getdate()
>
>
>
>
~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:234261
Archives:
Hi all,
Does anyone know why this works in access but not in SQL Server
SELECT viewID, views
FROMeventViews
WHERE active = '1'
AND eventID = '#theEventID#'
AND dateAdded = getdate()
~~
> -Original Message-
> From: eric.creese [mailto:[EMAIL PROTECTED]
> Sent: Thursday, 23 June 2005 12:59 PM
> To: CF-Talk
> Subject: Re: getDate()
>
> I believe it is Now()
>
> Actually waht I do for all my CF apps is set a var to Now() and insert
> that instead
:[EMAIL PROTECTED]
Sent: Thursday, 23 June 2005 12:59 PM
To: CF-Talk
Subject: Re: getDate()
I believe it is Now()
Actually waht I do for all my CF apps is set a var to Now() and insert
that instead of being dependent on the database default that way my code
is portable across other RDBMS
Oracle
I believe it is Now()
Actually waht I do for all my CF apps is set a var to Now() and insert that
instead of being dependent on the database default that way my code is
portable across other RDBMS
Oracle = sysdate
Access = now()
mysql= now()
sql = getdate()
- Original Message -
From
I usually use SQL Server to do stuff and as a matter of practice I
create a DateTimeStamp field in each table and give it a default of
getDate() so that each row added to each table records the date and time
it was added.
I have to do a little thing with mySQL but for the life of me can not
find
Now()
> -Original Message-
> From: CFDEV [mailto:[EMAIL PROTECTED]
> Sent: Friday, June 25, 2004 2:43 PM
> To: CF-Talk
> Subject: OT : MYSQL sysdate or getdate() equivalent
>
> Hi All,
>
> What's the equivalent of oracle sysdate or MS SQL getdate()
Hi All,
What's the equivalent of oracle sysdate or MS SQL getdate() in an insert
statement for mysql?
Thanks
Pat
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
[Donations and Support]
> From: Burns, John
>
> Is there a common function for getting the current date/time
> for MS SQL and MySQL? Anything I can use across both
> databases would be great, but MS doesn't like now() and MySQL
> doesn't like getDate(). Am I missing something?
You co
getting the current date/time for MS SQL
>and MySQL? Anything I can use across both databases would be great, but
>MS doesn't like now() and MySQL doesn't like getDate(). Am I missing
>something?
>
>John
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
Is there a common function for getting the current date/time for MS SQL
and MySQL? Anything I can use across both databases would be great, but
MS doesn't like now() and MySQL doesn't like getDate(). Am I missing
something?
John
[Todays Threads]
[This Message]
[Subscriptio
-Original Message-
From: Gilbert Midonnet [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 08, 2002 5:42 PM
To: CF-Talk
Subject: getdate() in access
GENERAL PROBLEM
There is a list of conferences. I would like to show upcoming conferences on
one page and past conferences on another.
Users are
lbert Midonnet [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 08, 2002 5:42 PM
To: CF-Talk
Subject: getdate() in access
GENERAL PROBLEM
There is a list of conferences. I would like to show upcoming conferences on
one page and past conferences on another.
Users are sending files up in excel.
can't be modified from text to date. I tried creating new fields in
excel and formating the field as date. but that didn't work.
SQL attempt
I would like to do a WHERE eventDate > getdate() in access -- but nothing
seems to work
date() doesn't give an ODBC error but it doe
Have you tried this in Query Analyser? SQL 7?
like
insert into table values(field1,.,GetDate())
Check to see whether your Field of "DateTime" Type?
Joe
-Original Message-
From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 31, 2002 7:56 PM
To: CF-Talk
S
> I did exactly that...defined in Ent Man as GetDate(), left
> it blank in the insert statement, but get this error:
> DIAGNOSTIC:
> ODBC Error Code = 22008 (Datetime field overflow)
> [Microsoft][ODBC SQL Server Driver][SQL Server]Syntax
> error converting
> datetime from
exactly that...defined in Ent Man as GetDate(), left it blank in
EH> the insert statement, but get this error:
EH> DIAGNOSTIC:
EH> ODBC Error Code = 22008 (Datetime field overflow)
EH> [Microsoft][ODBC SQL Server Driver][SQL Server]Syntax error converting
EH> datetime from charact
I did exactly that...defined in Ent Man as GetDate(), left it blank in
the insert statement, but get this error:
DIAGNOSTIC:
ODBC Error Code = 22008 (Datetime field overflow)
[Microsoft][ODBC SQL Server Driver][SQL Server]Syntax error converting
datetime from character string.
Regards,
Eric J
Either define the default value for the field as getDate(), or use
getDate() in your insert query.
ex:
INSERT INTO Table (Foo, Bar, DateField)
VALUES ('somedata', 42, getDate())
If you defined getDate() as the field default in ent manager, then
just leave the datefield stuff out of
Okay, the default value field in SQL 7 for date/time is what? I put
GetDate() in there to save CF processing and query time...so when I
submit a form the data gets inserted, I just want SQL to put in the
current date by default. I get an error using GetDate() though.
Any quick "duh&
What you want to do is trim off the time...
Try this:
Cast(floor(cast(getdate() as float)) as smalldatetime)
That'll trim the time off...
-Original Message-
From: Neil H. [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 11, 2002 4:42 PM
To: CF-Talk
Subject: Getdate() Date on
Could someone show me a replacement or another way to use GetDate in a query
in a stored procedure, so that getdate() would only return the
month/day/year. I know I could do datepart but how would that be in
something like
Insert Into Table
(MyDate)
Values(getdate())
Thanks,
Neil
38 matches
Mail list logo