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.

Time format: 0###

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
CatQM - 18 Jan 2008 15:10 GMT
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
Jeff Boyce - 18 Jan 2008 15:28 GMT
Take a look at the format property for the field in the table.  Or the
Format() function ... I'm remembering something like (untested):
   hhmm

Regards

Jeff Boyce
Microsoft Office/Access MVP

>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
Wayne-I-M - 18 Jan 2008 15:50 GMT
Something like this should do - change to update Q

SELECT IIf([SomeTableName]![TimeField]<1000,0 &
[SomeTableName]![TimeField]\60 & Format([SomeTableName]![TimeField] Mod
60,":""00""")) AS NewTime
FROM SomeTableName;

The <1000 is just a guess as not sure what your data looks like - I assume
it's a number

Good luck

Signature

Wayne
Manchester, England.

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