A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

convert numbers to time



 
 
Thread Tools Display Modes
  #1  
Old December 16th, 2009, 04:42 PM posted to microsoft.public.access.forms
chmcrae
external usenet poster
 
Posts: 1
Default convert numbers to time

I was working in Excel and typed in my time values as numbers (military
time), exported the data to Access and now would like to convert my numbers
to hrs:nn. Any suggestions would be greatly appreciated.
chmcrae
  #2  
Old December 16th, 2009, 04:55 PM posted to microsoft.public.access.forms
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default convert numbers to time

Access does not have a "time" data type. Access does have a Date/Time data
type.

If you only have time, consider storing that data in Access as Text, then
coming up with procedures that do the conversion/formatting.

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"chmcrae" wrote in message
...
I was working in Excel and typed in my time values as numbers (military
time), exported the data to Access and now would like to convert my
numbers
to hrs:nn. Any suggestions would be greatly appreciated.
chmcrae



  #3  
Old December 16th, 2009, 11:57 PM posted to microsoft.public.access.forms
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default convert numbers to time

Try this using your text field name for BigField --
Expr1: IIf([BigField] Is
Null,Null,IIf([BigField]="2400",CVDate("00:00:00"),CVDate(Left([BigField],2)
& ":" & Right([BigField],2) & ":00")))

--
Build a little, test a little.


"chmcrae" wrote:

I was working in Excel and typed in my time values as numbers (military
time), exported the data to Access and now would like to convert my numbers
to hrs:nn. Any suggestions would be greatly appreciated.
chmcrae

 




Thread Tools
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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:43 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.