#1  
Old 25th April 2009, 01:26 AM
Carsten Groh
 
Posts: n/a
Default SQL Statement for DateTime Field

Hi all together,

i have a table with a DateTime field. Is it possible to write this
field via SQL Statement. Each time i try it i get an Type mismatch!

UPDATE "User" SET Lastlogin=335.584 WHERE Name='LoginName'

If i try other fields in the "Loginname" rows everything works fine.

i would be glad if someone would throw me some lines.

Regard from the lake constance, germany!

Carsten
  #2  
Old 25th April 2009, 04:20 AM
Alexander Telegin [NDX]
 
Posts: n/a
Default Re: SQL Statement for DateTime Field

Please try following query:

UPDATE "User" SET Lastlogin=TIMESTAMP '2009-02-03 04:05:06' WHERE
Name='LoginName'

Regards,
Alex

Carsten Groh wrote:
> Hi all together,
>
> i have a table with a DateTime field. Is it possible to write this
> field via SQL Statement. Each time i try it i get an Type mismatch!
>
> UPDATE "User" SET Lastlogin=335.584 WHERE Name='LoginName'
>
> If i try other fields in the "Loginname" rows everything works fine.
>
> i would be glad if someone would throw me some lines.
>
> Regard from the lake constance, germany!
>
> Carsten

  #3  
Old 27th April 2009, 11:46 PM
Carsten Groh
 
Posts: n/a
Default Re: SQL Statement for DateTime Field

Hi Alex,

> UPDATE "User" SET Lastlogin=TIMESTAMP '2009-02-03 04:05:06' WHERE
> Name='LoginName'


Works perfect - as always after your hints! Thanks a lot!

Regard from the lake constance, Germany!

Carsten


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I define a not null Charater (NullString) Field Matthew Balraj nexusdb.public.support.adoprovider 1 12th February 2010 01:05 AM
Updating a value of a byte array field sid25 nexusdb.public.support.odbc 1 25th October 2009 05:28 PM
DateTime without seconsds Milan nexusdb.public.support.adoprovider 5 16th May 2007 06:55 PM
Selecting on Date Field Problem AJ nexusdb.public.support.odbc 2 24th March 2007 08:12 AM
Seconds are not being returned in DateTime fields Michael Duncan nexusdb.public.support.adoprovider 1 12th August 2004 05:18 AM


All times are GMT +11. The time now is 01:20 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.