Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Date incrementing Expand / Collapse
Author
Message
Posted Wednesday, August 7, 2013 8:23 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, November 11, 2013 3:11 AM
Points: 14, Visits: 30
Hi I am trying to get my date from 2011-01-01,Please help
Post #1481899
Posted Wednesday, August 7, 2013 8:30 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Today @ 3:46 PM
Points: 3,146, Visits: 7,948

I'm sorry, but can you reword that question? I don't understand what you're looking for and I don't understand what that has to do with the topic of Date Incrementing.




Alvin Ramard
Memphis PASS Chapter

All my SSC forum answers come with a money back guarantee. If you didn't like the answer then I'll gladly refund what you paid for it.
Post #1481903
Posted Tuesday, August 13, 2013 2:36 PM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 4:28 PM
Points: 2,027, Visits: 3,023
Extremely vague, but perhaps:

DATEDIFF function
DATEADD function

might help you.


SQL DBA,SQL Server MVP('07, '08, '09)
"In America, every man is innocent until proven broke!" Brant Parker
Post #1483972
Posted Wednesday, August 14, 2013 1:23 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, November 11, 2013 3:11 AM
Points: 14, Visits: 30
What i mean is to get my date from 2011

for example if i say skDte >= Getdate() i don't have to go back to my code and change it each time my report run it will give me current info

thats what i want get info current info starting from 2011

Hope i explained it
Post #1484098
Posted Wednesday, August 14, 2013 1:35 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 9:44 AM
Points: 5,303, Visits: 9,677
Still not clear. How about this?
skDte >= '20110101'

If that's not what you require, please supply table DDL (CREATE TABLE statement), sample data (INSERT statements) and expected results.

John
Post #1484106
Posted Wednesday, August 14, 2013 1:36 AM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Today @ 10:02 PM
Points: 23,210, Visits: 31,892
kgeeel240 (8/14/2013)
What i mean is to get my date from 2011

for example if i say skDte >= Getdate() i don't have to go back to my code and change it each time my report run it will give me current info

thats what i want get info current info starting from 2011

Hope i explained it


Not really, do you want data from a static point in time in 2011 or is this date calculated somehow based on todays (the day the report is run) date?



Lynn Pettis

For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here or when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here and here
Managing Transaction Logs

SQL Musings from the Desert Fountain Valley SQL (My Mirror Blog)
Post #1484107
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse