Date format

M

Mike

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
 
J

John Nurick

Hi Mike,

You can write the corresponding expression in VBA, using Instr() instead
of FIND().
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top