RE: Updateing Datetime field
Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance
Instead of sending the data directly to the database, first convert it to a
string and view the string value in the debug window, you may not be getting
what you think you are getting to begin with. In short make sure your
convertion is working.
"TnCoder" wrote
> Hi;
> I have a pocket pc app that allows users to select a date. The selection
> is in a string format; example: 08/21/2005. When I try to update the
> database, the date is put in as 01/01/1900 00:00:00. My SQL code snippet is:
> Admit_Date = convert(datetime," & tempdate & ",120)
> Where Admit_Date is the database field name, Tempdate is the user entered
> variable as string.
>
> Thanks in advance for all the help
>
> Dale
>
.
Relevant Pages
- Re: A little Rolodex [revised]
... including alpha sort and searching for any embedded string, ... In this application, a database is a directory, ... you may optionally provide any alternate UCASE program, ... NN -> first store NN as key length ... (comp.sys.hp48) - Re: return multiple rows from sql statement
... strings from input values is almost certainly a safe path to SQL ... Also, being a MySQL function, it knows what MySQL needs or uses. ... All characters that are entered in the fields make their way into the database unaltered. ... The insert of what surprisinlgly was NOT a syntax error, but a string called "mysql_insert_id" into an integer field resulted in the value zero being put in. ... (comp.lang.php) - Re: Code to delete/unlink Linked tables
... Public intLinkODBCTables As Variant, intLinkDB2Tables As Variant ... Public strLinkBackendDB As String, strLinkDSNname As String, strLinkLibName ... ' MsgBox "This database is in MDE format...I will delete/recreate ODBC ... Public Sub fncLinkDB2Table() ... (microsoft.public.access.modulesdaovba) - Re: Establish connection with and transferring data to Access
... The specific problem with your code is that you need to quote string ... Dim vConnection As New ADODB.Connection ... Experiment with the object model or check the documentation for the ... Doug's code opens and writes to an existing database. ... (microsoft.public.word.vba.general) - Re: Invalid variant type conversion
... because within regular programming, there would be no agreement upon what ... applications built by standard Delphi controls, ... NULL is the same as "" in a database. ... >> The empty string tells it all. ... (comp.lang.pascal.delphi.misc) |
|