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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Date format
In MS Excel I convert a cell that contains the following into minutes:
1d 01h 12m would convert to 24.2... The code is: =IF(iserror(FIND("d",E2)),0,LEFT(E2,FIND("d",E2)-1)*24)+MID(E2,FIND("h",E2)-2,2)+MID(E2,FIND("m",E2)-2,2)/60 Is there a way for Access to convert d h m into hh.m? Thanks, Mike |
#2
|
|||
|
|||
Hi Mike,
You can write the corresponding expression in VBA, using Instr() instead of FIND(). On Fri, 11 Mar 2005 22:29:01 -0800, "Mike" wrote: In MS Excel I convert a cell that contains the following into minutes: 1d 01h 12m would convert to 24.2... The code is: =IF(iserror(FIND("d",E2)),0,LEFT(E2,FIND("d",E2 )-1)*24)+MID(E2,FIND("h",E2)-2,2)+MID(E2,FIND("m",E2)-2,2)/60 Is there a way for Access to convert d h m into hh.m? Thanks, Mike -- John Nurick [Microsoft Access MVP] Please respond in the newgroup and not by email. |
#3
|
|||
|
|||
Check my October, 2003 Access Answers column in Pinnacle Publication's Smart
Access. You can get the column (and accompanying database) for free at http://www.accessmvp.com/djsteele/SmartAccess.html -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Mike" wrote in message ... In MS Excel I convert a cell that contains the following into minutes: 1d 01h 12m would convert to 24.2... The code is: =IF(iserror(FIND("d",E2)),0,LEFT(E2,FIND("d",E2)-1)*24)+MID(E2,FIND("h",E2)-2,2)+MID(E2,FIND("m",E2)-2,2)/60 Is there a way for Access to convert d h m into hh.m? Thanks, Mike |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Importing and storing a different date format | Jim T | General Discussion | 1 | November 2nd, 2004 01:45 PM |
i cant change the format of the date when referencing another cell | Brian | Worksheet Functions | 3 | September 29th, 2004 05:02 AM |
Date format incorrect mail merge | Emily | Mailmerge | 1 | September 9th, 2004 10:22 AM |
Date Format | Date Formating Problem | Database Design | 3 | August 16th, 2004 06:41 PM |
If statement | Doug | Worksheet Functions | 9 | June 28th, 2004 06:13 AM |