Automate Setting Version Numbers
You can tell Xcode 5 on Mountain Lion or Mavericks to execute a tiny bash (Unix) script on each build to automatically set your two version numbers.
In the Xcode project > Build Phases > Run Script
(1) Set "Shell" to:
/bin/sh
(2) Set the bash script field to:
#!/bin/bash
buildNumber=$(date -u "+%Y%m%d%H%M")
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "$INFOPLIST_FILE"
/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString $buildNumber" "$INFOPLIST_FILE"
For the checkboxes, mine are set to…
• Check the box "Show environment variables in build log
• Uncheck the box "Run script only when installing".

After a build, you can verify the version numbers in Xcode project > General > Identity.

Third Version Number
Be aware that your app's record on Apple's iTunesConnect web site defines a version number. If that number fails to match either CFBundleVersion
or CFBundleShortVersionString
you will get a warning. That warning may be ignored as it is not a show-stopping error.