RE: DateTime Stamp Problem
Oh! those! you don't need them. {ts is an ODBC escape secuence that makes the access ODBC driver to properly format the date to whatever they need to. there is {fn, {sp, etc. In fact, there is a {fn Now()} that you could use. I deal with access and oracle and SQL server so I use only escape secuences OR CF functions. INSERT INTO myTable (theDate) values ({fn NOW()}) see: http://msdn.microsoft.com/library/psdk/dasdk/odch34df.htm and then click on "show toc" for the escape secuence definitions in ODBC. > -Original Message- > From: [BOXoFUSES] Michael Slatoff [mailto:[EMAIL PROTECTED]] > Sent: Friday, October 27, 2000 4:16 PM > To: CF-Talk > Subject: RE: DateTime Stamp Problem > > > CreateODBDateTime will put in ' inside the {ts...} what we are talking > about is the ones on the outside of the {ts...} > > Micahel > > At 03:58 PM 10/27/00, you wrote: > >CreateODBCDateTime puts the apostrophes by itself. That is the prob. > > > > > > > > > > > -Original Message- > > > From: Chris Johnson [mailto:[EMAIL PROTECTED]] > > > Sent: Friday, October 27, 2000 3:10 PM > > > To: CF-Talk > > > Subject: DateTime Stamp Problem > > > > > > > > > I have a access database and I can't get the value of , > > > '#CreateODBCDateTime(Now())#', in my Insert statement to > work. I get the > > > error: > > > > > > [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing > > > operator) in query expression ''{ts '2000-10-27 14:49:50'}''. > > > > > > The field type is text and a length of 100. > > > > > > Is this the best way because long term I will search DateDiff of these > > > fields... > > > > > > Any help? > > > > > > -Chris > > > www.chris.com > > > Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message with 'unsubscribe' in the body to [EMAIL PROTECTED]
RE: DateTime Stamp Problem
CreateODBDateTime will put in ' inside the {ts...} what we are talking about is the ones on the outside of the {ts...} Micahel At 03:58 PM 10/27/00, you wrote: >CreateODBCDateTime puts the apostrophes by itself. That is the prob. > > > > > > -Original Message- > > From: Chris Johnson [mailto:[EMAIL PROTECTED]] > > Sent: Friday, October 27, 2000 3:10 PM > > To: CF-Talk > > Subject: DateTime Stamp Problem > > > > > > I have a access database and I can't get the value of , > > '#CreateODBCDateTime(Now())#', in my Insert statement to work. I get the > > error: > > > > [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing > > operator) in query expression ''{ts '2000-10-27 14:49:50'}''. > > > > The field type is text and a length of 100. > > > > Is this the best way because long term I will search DateDiff of these > > fields... > > > > Any help? > > > > -Chris > > www.chris.com > > > > > > _ > > Do You Yahoo!? > > Get your free @yahoo.com address at http://mail.yahoo.com > > > > -- > > -- > > Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ > > Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists > > or send a message with 'unsubscribe' in the body to > > [EMAIL PROTECTED] > >Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ >Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send >a message with 'unsubscribe' in the body to [EMAIL PROTECTED] Michael Slatoff [www.BOXoFUSES.com] Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message with 'unsubscribe' in the body to [EMAIL PROTECTED]
RE: DateTime Stamp Problem
CreateODBCDateTime puts the apostrophes by itself. That is the prob. > -Original Message- > From: Chris Johnson [mailto:[EMAIL PROTECTED]] > Sent: Friday, October 27, 2000 3:10 PM > To: CF-Talk > Subject: DateTime Stamp Problem > > > I have a access database and I can't get the value of , > '#CreateODBCDateTime(Now())#', in my Insert statement to work. I get the > error: > > [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing > operator) in query expression ''{ts '2000-10-27 14:49:50'}''. > > The field type is text and a length of 100. > > Is this the best way because long term I will search DateDiff of these > fields... > > Any help? > > -Chris > www.chris.com > > > _ > Do You Yahoo!? > Get your free @yahoo.com address at http://mail.yahoo.com > > -- > -- > Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ > Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists > or send a message with 'unsubscribe' in the body to > [EMAIL PROTECTED] Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message with 'unsubscribe' in the body to [EMAIL PROTECTED]
RE: DateTime Stamp Problem
The best way to store the data is in a date formated column. Otherwise, later on when you goto perform a datediff statement you will need to convert all of the data from the columns and there is no real way at that point to ensure the data will not create and error if the conversion does not go well, happens really often!!!. Chris Williams -Original Message- From: Chapman, Katrina [mailto:[EMAIL PROTECTED]] Sent: Friday, October 27, 2000 3:54 PM To: CF-Talk Subject: RE: DateTime Stamp Problem I'm not going to answer the question about the best way to store your data. But can we see the original query? --K -Original Message- From: Chris Johnson [mailto:[EMAIL PROTECTED]] Sent: Friday, October 27, 2000 3:10 PM To: CF-Talk Subject: DateTime Stamp Problem I have a access database and I can't get the value of , '#CreateODBCDateTime(Now())#', in my Insert statement to work. I get the error: [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression ''{ts '2000-10-27 14:49:50'}''. The field type is text and a length of 100. Is this the best way because long term I will search DateDiff of these fields... Any help? -Chris www.chris.com _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message with 'unsubscribe' in the body to [EMAIL PROTECTED] Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message with 'unsubscribe' in the body to [EMAIL PROTECTED] Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message with 'unsubscribe' in the body to [EMAIL PROTECTED]
Re: DateTime Stamp Problem
Two things. try ommiting any " or ' from your insert (dates, like numbers, don't require quotes) the other thing is... You can just set the field in the database to default to Now() (it is an access function) If feels weird the first time you set it up that way, but you'll never go back : ) Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message with 'unsubscribe' in the body to [EMAIL PROTECTED]
Re: DateTime Stamp Problem
If you are trying to insert into a Date/Time field you don't need to put the #CreateODBCDateTime(now())# in ''. It would be nice to see more of your SQL to help though. Michael At 03:09 PM 10/27/00, you wrote: >I have a access database and I can't get the value of , >'#CreateODBCDateTime(Now())#', in my Insert statement to work. I get the >error: > > [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing >operator) in query expression ''{ts '2000-10-27 14:49:50'}''. > >The field type is text and a length of 100. > >Is this the best way because long term I will search DateDiff of these >fields... > >Any help? > >-Chris >www.chris.com > > >_ >Do You Yahoo!? >Get your free @yahoo.com address at http://mail.yahoo.com > > >Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ >Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send >a message with 'unsubscribe' in the body to [EMAIL PROTECTED] Michael Slatoff [www.BOXoFUSES.com] Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message with 'unsubscribe' in the body to [EMAIL PROTECTED]
RE: DateTime Stamp Problem
I'm not going to answer the question about the best way to store your data. But can we see the original query? --K -Original Message- From: Chris Johnson [mailto:[EMAIL PROTECTED]] Sent: Friday, October 27, 2000 3:10 PM To: CF-Talk Subject: DateTime Stamp Problem I have a access database and I can't get the value of , '#CreateODBCDateTime(Now())#', in my Insert statement to work. I get the error: [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression ''{ts '2000-10-27 14:49:50'}''. The field type is text and a length of 100. Is this the best way because long term I will search DateDiff of these fields... Any help? -Chris www.chris.com _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message with 'unsubscribe' in the body to [EMAIL PROTECTED] Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message with 'unsubscribe' in the body to [EMAIL PROTECTED]
DateTime Stamp Problem
I have a access database and I can't get the value of , '#CreateODBCDateTime(Now())#', in my Insert statement to work. I get the error: [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression ''{ts '2000-10-27 14:49:50'}''. The field type is text and a length of 100. Is this the best way because long term I will search DateDiff of these fields... Any help? -Chris www.chris.com _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message with 'unsubscribe' in the body to [EMAIL PROTECTED]