April 1, 2006 at 4:26 am
I've found that there is a function called "trftime" in Sqlite. However, I cannot find any function like this in T-SQL. Is there any function to do this?
April 1, 2006 at 5:07 am
Like this? I don't know SQLLite.
select datepart(dw, getdate())
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
April 1, 2006 at 4:24 pm
Unless you're looking for..
datename(dw, getdate())..?!?!
Since the datepart is dependent on the current setting of "datefirst"...check that first if that's the one you want..
**ASCII stupid question, get a stupid ANSI !!!**
October 12, 2011 at 1:11 pm
If you only want to get the day index, you should check the following description:
October 13, 2011 at 3:49 am
perhaps use convert e.g. convert(varchar, xdate,101)
October 13, 2011 at 2:31 pm
don't know sqlite... it would be helpful if you describe what the function does and give an example.
October 31, 2011 at 10:13 am
Were you able to find an equivalent function in SQL?
October 31, 2011 at 10:02 pm
kpao (4/1/2006)
I've found that there is a function called "trftime" in Sqlite. However, I cannot find any function like this in T-SQL. Is there any function to do this?
You really do need to tell us what that does. Are you looking for a numeric day of the week, a 3 letter name of the day of the week, or the full name of the day of the week?
--Jeff Moden
Change is inevitable... Change for the better is not.
October 31, 2011 at 10:05 pm
ulfemsoy (10/12/2011)
If you only want to get the day index, you should check the following description:
You don't need a UDF for this...
SELECT (DATEDIFF(dd,'17530101',GETDATE())-1) %7
--Jeff Moden
Change is inevitable... Change for the better is not.
October 31, 2011 at 10:27 pm
BWAA-HAAA!!! I just realized the original question is from 5 years ago and the OP is probably long gone. 😀
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 10 posts - 1 through 9 (of 9 total)
You must be logged in to reply to this topic. Login to reply