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 / Queries / February 2008

Tip: Looking for answers? Try searching our database.

Text or number to short time.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
quinto - 13 Feb 2008 04:07 GMT
I have linked an XLS file to a dataabse and I  need to convert the following
to short time
Appt Time: 815 (Number), Return Time: 1455 (Custom hmm).
I have no control how the xls file is formatted or what field are made
available, I will use a query to select about 5 fields and uppned them to a
table.
Also I would like to convert Apt Date: 20070101 (Number) to date 01/01/2007.

Thanks

Quinto
John Spencer - 13 Feb 2008 15:25 GMT
Convert the time using
TimeValue(Format(1815,"##:##"))

Convert the date using
DateValue(Format(20070101 ,"####/##/##"))

Of course, you will need to test for nulls/blanks.  You can probably do that
with
IIF (IsDate(Format(20070101 ,"####/##/##")),DateValue(Format(20070101
,"####/##/##")),Null)
IIF(IsDate((Format(1815,"##:##")),TimeValue(Format(1815,"##:##")),Null)

Signature

John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
.

>I have linked an XLS file to a dataabse and I  need to convert the
>following
[quoted text clipped - 10 lines]
>
> Quinto
quinto - 14 Feb 2008 04:56 GMT
Thanks for your help

Quinto

>Convert the time using
>TimeValue(Format(1815,"##:##"))
[quoted text clipped - 13 lines]
>>
>> Quinto
 
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.