Moses was up the mountain for forty days and forty nights .
God later commanded Moses to inscribe two other tablets , to replace the ones Moses smashed , so Moses went to the mountain again , for another period of 40 days and nights , and when he returned , the commandments were finally given .