Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 what is meaning of 23,59,59

Author  Topic 

ramu143
Yak Posting Veteran

64 Posts

Posted - 2008-05-08 : 02:46:02
set @pDate2= dbo.AsString(@pYear,@pMonth,@pDay2,23,59,59)

explain the above query

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-05-08 : 03:13:38
quote:
Originally posted by ramu143

set @pDate2= dbo.AsString(@pYear,@pMonth,@pDay2,23,59,59)

explain the above query


Post the full code
Also post the script of the function AsString

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-05-08 : 03:32:59
You assign a value that is returned from the AsString function to the local variable @pDate2.
The function takes 6 parameters, of which the first three seems to be YEAR, MONTH and DAY in respective order.
The last three parameters 23, 59 and 59 seems to be some kind of limit for when day is near end.



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

Lumbago
Norsk Yak Master

3271 Posts

Posted - 2008-05-08 : 04:07:49
Seems to me like it's a formatting function to display date/time as a specially formatted string. Parameters seems to be year, month, day, hour, minute, second.

So set @pDate2= dbo.AsString(@pYear,@pMonth,@pDay2,23,59,59) might set @pDate2 to something like "8th of May 2008, at 23:59:59'


--
Lumbago
Go to Top of Page

raky
Aged Yak Warrior

767 Posts

Posted - 2008-05-10 : 01:33:54
HI,

its a split condition got values based on the comma separated string

Be cool
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-05-10 : 01:41:11
You could either have a look into the body of function dbo.AsString to see the meaning yourself or post the code for us to explain. You can see the body using sp_helptext system stored procedure.
Go to Top of Page

Merkin
Funky Drop Bear Fearing SQL Dude!

4970 Posts

Posted - 2008-05-10 : 06:47:11
Sounds like an odd female body shape to me.

Damian
"A foolish consistency is the hobgoblin of little minds." - Emerson
Go to Top of Page

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2008-05-10 : 09:03:33
As long as we're taking wild guesses here, I'm going with: the function returns a date and this particular call is to assign the end date of a date range. So rather than a formatting issue it sets the given day to 11:59:59 PM.

EDIT:
for searching purposes...

Be One with the Optimizer
TG
Go to Top of Page
   

- Advertisement -