| | |
Get last month from timestamp
Please support our MS SQL advertiser: Intel Parallel Studio Home
Thread Solved |
•
•
Join Date: Sep 2008
Posts: 339
Reputation:
Solved Threads: 27
How would I select everything from last month in a sql statment my cell has a time stamp in it
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
MS SQL Syntax (Toggle Plain Text)
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
Last edited by freshfitz; Jan 1st, 2009 at 3:50 pm.
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?
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?
BI Developer | LINKdotNET
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
•
•
Join Date: Sep 2008
Posts: 339
Reputation:
Solved Threads: 27
I want to display all the orders from last month so
sql Syntax (Toggle Plain Text)
SELECT * FROM Get_estimates WHERE DateTimeStamp = [lastmonth]
Last edited by peter_budo; Jan 6th, 2009 at 9:21 am. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Ok, please give me sample Data and your desired output
BI Developer | LINKdotNET
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
![]() |
Similar Threads
- problem with date validation (JavaScript / DHTML / AJAX)
- REg: timestamp with milliseconds linux c++ (C++)
- expired date validation and session (PHP)
- Time Stamp Help (PHP)
- Data Base error (MySQL)
- php mysql question (PHP)
- FireWall Back ups with Expect (Shell Scripting)
- capturing line from script output and appending to a file (Shell Scripting)
- C# calling parameterized Oracle storage procedure ? (C#)
- ugh! One Page, 2 re-loads (page request i guess) (PHP)
Other Threads in the MS SQL Forum
- Previous Thread: Crazy CrossTab problems
- Next Thread: SQL Server 2005 - Merge Replication
| Thread Tools | Search this Thread |






