Wrox Programmer Forums
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 24th, 2004, 12:38 PM
Ben Ben is offline
Authorized User
 
Join Date: Jun 2003
Posts: 75
Thanks: 0
Thanked 0 Times in 0 Posts
Default Formatting

Is there anyway in Access to display accumulated minutes like in Excel when using the [mm]:ss format?
 
Old February 24th, 2004, 02:28 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 129
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Sorry Ben, don't actually understand what you mean. What are you trying to do?

Clive Astley
 
Old February 25th, 2004, 06:38 AM
Ben Ben is offline
Authorized User
 
Join Date: Jun 2003
Posts: 75
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Clive,

Thanks for replying, I have some data which has to be displayed in minutes and seconds format ("nn:ss"). The other day some of the data was over an hour, and with the "nn:ss" format the data read 07:49, I can't use "01:07:49" to display the data, so basically I want the data to appear as 67:49. In excel entering the format "[mm]:ss" would do this, I just wanted to know if there was an equivelant easy way of doing this in Access.
It's not often that this will occur so it's not a big deal, I guess if the worst comes to the worst I could create a custom formula but it just seems a bit overkill.

Ben
 
Old February 28th, 2004, 05:52 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 129
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ben, I'm still not certain what your original data format is. The following will display a number of seconds in the format you need. Does it help?

Public Function Conversion(myInput As Integer) As String
  Dim myMins As Integer
  Dim mySecs As Integer
  myMins = Int(myInput / 60)
  mySecs = myInput - myMins * 60
  Conversion = myMins & ":" & mySecs
End Function

Clive Astley





Similar Threads
Thread Thread Starter Forum Replies Last Post
Cell formatting Neal Excel VBA 0 May 9th, 2006 08:02 AM
String formatting MargateFan XSLT 4 May 5th, 2006 04:54 AM
Conditional Formatting Corey Access 1 November 8th, 2005 12:18 AM
Formatting syrex XSLT 2 November 5th, 2005 08:23 AM
formatting dates treasacrowe Classic ASP Basics 3 October 20th, 2004 06:52 PM





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