Jump to content

Dates form sql


avo

Recommended Posts

HI

can anyone please point me in the right dirrection with an example ive been looking at the sql manual but struggling to find what i need

i have a sql table with a few date coloums

i would like to select all from the row where month interval + 2 months to whats in the coloum

if this makes sense

a few example of this would be great

All appriciated
Link to comment
Share on other sites

first off, what date datatype are you using? date? time? datetime? timestamp?

2nd, can you be a little more clearer with this:

[b]select all from the row where month interval + 2 months to whats in the coloum [/b]

do you mean from like, now to now+2months? or timeA to timeA+2months?
Link to comment
Share on other sites

Hi thanks its date im using

i wish to select all from tble_name where date_coloum is same as date(today) less ( - ) 2 months

how would this be write for sql to unserstand the select


hope that explanes a little better

Thanks in advance
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.