Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 19th, 2003, 10:56 AM
Registered User
 
Join Date: Oct 2003
Location: DC, DC, USA.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default insert system date. no date and time

Hi friends,

I try to update a table with system date. it does not work. no system date and time.
my query as
***UPDATE ADJFLAT SET ADJFLAT.ImportDate = Format(Date(),'mm/dd/yyyy')
however, i am still got system format of date and time
as 11/18/2003 0:00:00.

But i am only need to 11/18/2003 as output results


Thnaks!!!



Jimmy

Reply With Quote
  #2 (permalink)  
Old November 19th, 2003, 11:37 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , United Kingdom.
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

That's because the field is a DateTime type - there's no such thing as a Date only field in Access. If you don't put in a time you get the default of midnight. Just ignore the time part when you display the field.
Reply With Quote
  #3 (permalink)  
Old November 19th, 2003, 12:12 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Oxford, , United Kingdom.
Posts: 120
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Jimmy

This has just been covered here: http://p2p.wrox.com/topic.asp?TOPIC_ID=6587


Brian Skelton
Braxis Computer Services Ltd.
Reply With Quote
  #4 (permalink)  
Old November 19th, 2003, 02:22 PM
sal sal is offline
Friend of Wrox
 
Join Date: Oct 2003
Location: Clarksville, TN, USA.
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Now, for my life, I can not recall how to get the time out of the datetime
When I do

Time: Format([dateone],"hh:nn ss")

only re turns
20:45
in military time. How do I get it to do the standart 8:45 PM
My brain is fried.




Sal
Reply With Quote
  #5 (permalink)  
Old November 19th, 2003, 04:47 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Oxford, , United Kingdom.
Posts: 120
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Try:
Code:
Format([dateone],"hh:mm AM/PM")

Brian Skelton
Braxis Computer Services Ltd.
Reply With Quote
  #6 (permalink)  
Old November 19th, 2003, 05:20 PM
sal sal is offline
Friend of Wrox
 
Join Date: Oct 2003
Location: Clarksville, TN, USA.
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I will be able to sleep tonight.

Thanks Brian.




Sal
Reply With Quote
  #7 (permalink)  
Old November 20th, 2003, 01:11 PM
Registered User
 
Join Date: Nov 2003
Location: Hyderabad, AP, India.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

If you just give Date(), it should return just date. I am doing that already.

Quote:
quote:Originally posted by jimmy
 Hi friends,

I try to update a table with system date. it does not work. no system date and time.
my query as
***UPDATE ADJFLAT SET ADJFLAT.ImportDate = Format(Date(),'mm/dd/yyyy')
however, i am still got system format of date and time
as 11/18/2003 0:00:00.

But i am only need to 11/18/2003 as output results


Thnaks!!!



Jimmy

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I set system time & date in VB.net ? mike123abc Pro VB.NET 2002/2003 1 April 27th, 2007 10:00 AM
Insert System date and System Time -Form _TextBox cnkumar74 VB How-To 14 February 14th, 2007 10:52 AM
HOW CAN SYSTEM DATE N TIME BE CAPTURED IN A TXTBOX cnkumar74 VB Databases Basics 6 February 14th, 2007 02:09 AM
store insert/update date/time stamp in sql2k db alexdcosta ASP.NET 2.0 Basics 0 June 22nd, 2006 05:44 AM
Time & date insert and display in myql/asp page karib MySQL 3 June 30th, 2004 05:29 AM



All times are GMT -4. The time now is 01:10 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.