Jump to content

Archived

This topic is now archived and is closed to further replies.

avo

Dates form sql

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

Share this post


Link to post
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?

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

×

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.