Excel tools to demonstrate


DATE, DATEVALUE Functions



Yüklə 119,95 Kb.
səhifə40/56
tarix05.01.2022
ölçüsü119,95 Kb.
#72366
1   ...   36   37   38   39   40   41   42   43   ...   56

DATE, DATEVALUE Functions


The last two date functions I’ll mention are DATE and DATEVALUE. The DATE function takes a date, such as 3/14/2004, and return the serial value, in this case 68030. I see no obvious uses for this function. (After all, you can see the serial value if you want by formatting the date cell as a number. Besides, you probably have little interest in the actual number anyway.) I’ve mentioned it simply because you might see it in online help and think it’s important.

The DATEVALUE function, on the other hand, can be a real life-saver. It takes a date stored as text and returns the corresponding serial value, which you could then format as a date. Why is this important? Suppose you have a lot of data stored in some type of legacy system in your business, and you are somehow able to “dump” it into Excel. The chances are that all dates will be imported as text. That is, a cell value will look something like 5/20/2001, but Excel won’t recognize it as a date. Without the DATEVALUE function, you would have retype all of the dates! However, DATEVALUE saves you this mind-numbing work.



To use the DATEVALUE function:

Enter the formula =DATEVALUE(datetext), where datetext refers to a date stored as text. Then format the result as a date.



Try it! Create dates in column B corresponding to the text values in column A that happen to look like dates. (I typed an apostrophe in front of each value in column A. That’s why they are interpreted as text, not as dates.)



Yüklə 119,95 Kb.

Dostları ilə paylaş:
1   ...   36   37   38   39   40   41   42   43   ...   56




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©muhaz.org 2024
rəhbərliyinə müraciət

gir | qeydiyyatdan keç
    Ana səhifə


yükləyin