View Full Version : EXCEL Calc from Date

26-03-2002, 09:38 PM
I need to create a date-based HASH No, If the date format is 26-03-02, the answer I need is 31 (26+3+2). BUT if I use MID function then I get the underlying Date Code, not the actual date.

Any ideas?


Graham Bockett

27-03-2002, 07:18 AM
If you put the date in A1, then this formula in A2:

=VALUE(TEXT(A1,'yy'))+VALUE(TEXT(A1,'m'))+VALUE(TE XT(A1,'d'))

you will see what you need <important> AFTER you format A2 as NUMBER </important>

From that example it should be obvious how to perform other similar operations should the hash requirements change.

Alan Carpenter

27-03-2002, 01:12 PM
Alternatively use: