Click here to Skip to main content
15,884,472 members
Home / Discussions / Database
   

Database

 
QuestionHow do I change the location of (LOCAL)? Pin
Marcus J. Smith30-Mar-07 5:01
professionalMarcus J. Smith30-Mar-07 5:01 
AnswerRe: How do I change the location of (LOCAL)? Pin
Colin Angus Mackay30-Mar-07 5:08
Colin Angus Mackay30-Mar-07 5:08 
GeneralRe: How do I change the location of (LOCAL)? Pin
Marcus J. Smith30-Mar-07 5:12
professionalMarcus J. Smith30-Mar-07 5:12 
GeneralRe: How do I change the location of (LOCAL)? Pin
Colin Angus Mackay30-Mar-07 6:49
Colin Angus Mackay30-Mar-07 6:49 
GeneralRe: How do I change the location of (LOCAL)? Pin
Marcus J. Smith30-Mar-07 7:13
professionalMarcus J. Smith30-Mar-07 7:13 
GeneralRe: How do I change the location of (LOCAL)? Pin
Colin Angus Mackay30-Mar-07 8:40
Colin Angus Mackay30-Mar-07 8:40 
AnswerRe: How do I change the location of (LOCAL)? Pin
kubben30-Mar-07 13:44
kubben30-Mar-07 13:44 
QuestionExtracting just the date portion Pin
Marc Clifton30-Mar-07 4:28
mvaMarc Clifton30-Mar-07 4:28 
Is this the best way to extract just the date portion of a datetime field while preserving the fact that the field is a datetime, so that date range comparisons can be made (without dealing with the time portion)?

Convert(datetime, Convert(nvarchar, transactiondatetime, 101))

Example:

select amount from deposit where
Convert(datetime, Convert(nvarchar, transactiondatetime, 101)) >= Convert(datetime, @StartDate) and
Convert(datetime, Convert(nvarchar, transactiondatetime, 101)) <= Convert(datetime, @EndDate)

where StartDate and EndDate are passed in as strings with only the date component (like '1/30/2007')

Thanks!

Marc





Thyme In The Country

Interacx

People are just notoriously impossible. --DavidCrow
There's NO excuse for not commenting your code. -- John Simmons / outlaw programmer
People who say that they will refactor their code later to make it "good" don't understand refactoring, nor the art and craft of programming. -- Josh Smith


AnswerRe: Extracting just the date portion Pin
Colin Angus Mackay30-Mar-07 4:39
Colin Angus Mackay30-Mar-07 4:39 
GeneralRe: Extracting just the date portion Pin
Marc Clifton30-Mar-07 4:47
mvaMarc Clifton30-Mar-07 4:47 
GeneralRe: Extracting just the date portion Pin
Colin Angus Mackay30-Mar-07 5:11
Colin Angus Mackay30-Mar-07 5:11 
AnswerRe: Extracting just the date portion Pin
kubben30-Mar-07 5:08
kubben30-Mar-07 5:08 
GeneralRe: Extracting just the date portion Pin
Marc Clifton30-Mar-07 5:14
mvaMarc Clifton30-Mar-07 5:14 
Questiongetting RecordCount = -1 Pin
Ankur.Bakliwal30-Mar-07 3:48
Ankur.Bakliwal30-Mar-07 3:48 
AnswerRe: getting RecordCount = -1 Pin
Christian Graus30-Mar-07 3:55
protectorChristian Graus30-Mar-07 3:55 
GeneralRe: getting RecordCount = -1 Pin
Ankur.Bakliwal30-Mar-07 3:59
Ankur.Bakliwal30-Mar-07 3:59 
GeneralRe: getting RecordCount = -1 Pin
Christian Graus30-Mar-07 4:03
protectorChristian Graus30-Mar-07 4:03 
AnswerRe: getting RecordCount = -1 Pin
roel_v31-Mar-07 2:45
roel_v31-Mar-07 2:45 
QuestionDistribution of software Pin
drc_no130-Mar-07 3:41
drc_no130-Mar-07 3:41 
AnswerRe: Distribution of software Pin
Colin Angus Mackay30-Mar-07 4:32
Colin Angus Mackay30-Mar-07 4:32 
QuestionUrgent Pin
Test27030730-Mar-07 2:51
Test27030730-Mar-07 2:51 
AnswerRe: Urgent Pin
Christian Graus30-Mar-07 3:06
protectorChristian Graus30-Mar-07 3:06 
GeneralRe: Urgent Pin
Test27030730-Mar-07 3:44
Test27030730-Mar-07 3:44 
GeneralRe: Urgent Pin
Christian Graus30-Mar-07 4:00
protectorChristian Graus30-Mar-07 4:00 
GeneralRe: Urgent Pin
Test27030730-Mar-07 4:02
Test27030730-Mar-07 4:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.