954,153 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Get last month from timestamp

How would I select everything from last month in a sql statment my cell has a time stamp in it

SELECT DateTimeStamp
from Get_estimates


Ouput

[DateTimeStamp]
2008-02-28 11:39:35.247
2008-03-09 13:15:12.513
2008-03-09 13:16:53.700
2008-03-26 13:30:20.077
2008-03-26 13:30:51.810

freshfitz
Posting Pro in Training
436 posts since Sep 2008
Reputation Points: 12
Solved Threads: 36
 

So the output should be
2008-03-09 13:15:12.513
2008-03-09 13:16:53.700
2008-03-26 13:30:20.077
2008-03-26 13:30:51.810

right?

Ramy Mahrous
Postaholic
2,196 posts since Aug 2006
Reputation Points: 480
Solved Threads: 276
 

I want to display all the orders from last month so

SELECT *
from Get_estimates
where DateTimeStamp = [lastmonth]
freshfitz
Posting Pro in Training
436 posts since Sep 2008
Reputation Points: 12
Solved Threads: 36
 

Ok, please give me sample Data and your desired output

Ramy Mahrous
Postaholic
2,196 posts since Aug 2006
Reputation Points: 480
Solved Threads: 276
 

I got it thanks

freshfitz
Posting Pro in Training
436 posts since Sep 2008
Reputation Points: 12
Solved Threads: 36
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You