Forum Home
Press F1
 
Thread ID: 17059 2002-03-26 09:38:00 EXCEL Calc from Date Guest (0) Press F1
Post ID Timestamp Content User
40550 2002-03-26 09:38:00 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?

TFYH

Graham Bockett
Guest (0)
40551 2002-03-26 19:18:00 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.

Cheers,
Alan Carpenter
Guest (0)
40552 2002-03-27 01:12:00 Alternatively use:

=DAY(A1)+MONTH(A1)+YEAR(A1)-2000
Guest (0)
1