Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / March 2008

Tip: Looking for answers? Try searching our database.

Date & time

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Barcode - 13 Mar 2008 20:44 GMT
Hello

I would like to insert the Date and Time, but when I test this code it
insert only date.
How it is possible to insert in the same filed date + time ?

DoCmd.RunSQL "INSERT INTO Tillgangar ( Anvand, now, Mobiltelefon ) SELECT 1,
Date() , [Mobiltelefon];"

Thank you
John W. Vinson - 13 Mar 2008 21:00 GMT
>Hello
>
[quoted text clipped - 6 lines]
>
>Thank you

Date() inserts the current date. Now() inserts the date and time. Just replace
the Date() in the insert clause with Now().
Signature


            John W. Vinson [MVP]

Barcode - 13 Mar 2008 21:15 GMT
Thank you very much

Jesus Blease
Douglas J. Steele - 13 Mar 2008 22:12 GMT
In addition to the advice John gave you, I'd strongly recommend that you
rename the field in your table named Now. Now is a reserved word, and using
it for your own purposes can lead to all sorts of problems.

For a good discussion on what names to avoid, see what Allen Browne has at
http://www.allenbrowne.com/AppIssueBadWord.html

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)

> Hello
>
[quoted text clipped - 7 lines]
>
> Thank you
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.