First, notice this is a prayer of Moses as opposed to one of David.
I've also heard verse 12 before. The idea is that we need to remember our own frailty and pending death so we might seek wisdom and use our time wisely. Our goal in life is not to accumulate the most stuff but to get to Heaven and serve God.
Psa 90:1 A Prayer of Moses the man of God. Lord, thou hast been our dwelling place in all generations.
Psa 90:2 Before the mountains were brought forth, or ever thou hadst formed the earth and the world, even from everlasting to everlasting, thou art God.
Psa 90:3 Thou turnest man to destruction; and sayest, Return, ye children of men.
Psa 90:4 For a thousand years in thy sight are but as yesterday when it is past, and as a watch in the night.
Psa 90:5 Thou carriest them away as with a flood; they are as a sleep: in the morning they are like grass which groweth up.
Psa 90:6 In the morning it flourisheth, and groweth up; in the evening it is cut down, and withereth.
Psa 90:7 For we are consumed by thine anger, and by thy wrath are we troubled.
Psa 90:8 Thou hast set our iniquities before thee, our secret sins in the light of thy countenance.
Psa 90:9 For all our days are passed away in thy wrath: we spend our years as a tale that is told.
Psa 90:10 The days of our years are threescore years and ten; and if by reason of strength they be fourscore years, yet is their strength labour and sorrow; for it is soon cut off, and we fly away.
Psa 90:11 Who knoweth the power of thine anger? even according to thy fear, so is thy wrath.
Psa 90:12 So teach us to number our days, that we may apply our hearts unto wisdom.
Psa 90:13 Return, O LORD, how long? and let it repent thee concerning thy servants.
Psa 90:14 O satisfy us early with thy mercy; that we may rejoice and be glad all our days.
Psa 90:15 Make us glad according to the days wherein thou hast afflicted us, and the years wherein we have seen evil.
Psa 90:16 Let thy work appear unto thy servants, and thy glory unto their children.
Psa 90:17 And let the beauty of the LORD our God be upon us: and establish thou the work of our hands upon us; yea, the work of our hands establish thou it.