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 / General 2 / January 2008

Tip: Looking for answers? Try searching our database.

Tecnologia

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jose Gonzalez - 20 Jan 2008 22:41 GMT
From: "CatQM" <CatQM@discussions.microsoft.com>
Subject: Time format: 0###
Date: Friday, January 18, 2008 10:10 AM

I have imported data into Access with 24 hr clock times (just numbers, no
formatting).  My times before 1200 do not have a leading zero.   For example
I have 300 instead of 0300. How can I add this needed zero in a query? --
Cat
pietlinden@hotmail.com - 20 Jan 2008 23:19 GMT
> From: "CatQM" <Ca...@discussions.microsoft.com>
> Subject: Time format: 0###
[quoted text clipped - 4 lines]
> I have 300 instead of 0300. How can I add this needed zero in a query? --
> Cat

how about taking the left 2 characters if the length=4

Hour:Left$(strTextTime, len$(strTextTime)-2)
Minute: Right$(strTextTime,2)
Ken Sheridan - 20 Jan 2008 23:23 GMT
Set the Format property of the column in query design view to:

   0000

Alternatively set the Format property of any control bound to the field in a
form or report to the same.

Ken Sheridan
Stafford, England

> From: "CatQM" <CatQM@discussions.microsoft.com>
> Subject: Time format: 0###
[quoted text clipped - 4 lines]
> I have 300 instead of 0300. How can I add this needed zero in a query? --
> Cat
 
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



©2009 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.