1
  • SQL convert numeric to date format

    How can I convert an 8 digit numeric (format ccyymmdd) into a real datefield to be used in date arithmetics? I need to calculate the number of months between the month (current date) and a date represented in my DB as an 8 digit numeric with format "ccyymmdd". Therefor (I assume) I need to convert...

    DanTheDane2,555 pointsBadges:
  • Date calculation incorrect in sql when +1 month entered

    Date calculation incorrect in sql when 1 month entered. If we add 1 month to 28-Feb then it shows 28-Mar instead of 31-Mar. Similarly if I add 1 month to 30-Nov it should show 31-Dec instead of 30-Dec. SQL command run is SELECT CCDATE + 1 MONTHS FROM COGNOSMIS/xyzPF WHERE CCDATE = '2010-02-28'

    JohnsonMumbai1,160 pointsBadges:
1

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following