This commit is contained in:
RDeck 2025-09-23 07:13:48 -04:00
parent 0f3009a517
commit df9f07a07a
13 changed files with 88 additions and 15 deletions

Binary file not shown.

View File

@ -1,7 +1,16 @@
{
"Version": 1,
"WorkspaceRootPath": "C:\\Repos\\SqlCustomFunctions\\",
"Documents": [],
"Documents": [
{
"AbsoluteMoniker": "D:0:0:{1CE29CD9-8ED4-497C-A794-85FA3BA3B87F}|SqlCustomFunctions.sqlproj|C:\\Repos\\SqlCustomFunctions\\ClsConversions.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{1CE29CD9-8ED4-497C-A794-85FA3BA3B87F}|SqlCustomFunctions.sqlproj|solutionrelative:ClsConversions.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{1CE29CD9-8ED4-497C-A794-85FA3BA3B87F}|SqlCustomFunctions.sqlproj|C:\\Repos\\SqlCustomFunctions\\IPFunctions.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{1CE29CD9-8ED4-497C-A794-85FA3BA3B87F}|SqlCustomFunctions.sqlproj|solutionrelative:IPFunctions.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
}
],
"DocumentGroupContainers": [
{
"Orientation": 0,
@ -9,7 +18,7 @@
"DocumentGroups": [
{
"DockedWidth": 200,
"SelectedChildIndex": -1,
"SelectedChildIndex": 11,
"Children": [
{
"$type": "Bookmark",
@ -54,6 +63,32 @@
{
"$type": "Bookmark",
"Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}"
},
{
"$type": "Document",
"DocumentIndex": 0,
"Title": "ClsConversions.cs",
"DocumentMoniker": "C:\\Repos\\SqlCustomFunctions\\ClsConversions.cs",
"RelativeDocumentMoniker": "ClsConversions.cs",
"ToolTip": "C:\\Repos\\SqlCustomFunctions\\ClsConversions.cs",
"RelativeToolTip": "ClsConversions.cs",
"ViewState": "AgIAACIAAAAAAAAAAAAqwEgAAAANAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-09-23T11:04:08.946Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 1,
"Title": "IPFunctions.cs",
"DocumentMoniker": "C:\\Repos\\SqlCustomFunctions\\IPFunctions.cs",
"RelativeDocumentMoniker": "IPFunctions.cs",
"ToolTip": "C:\\Repos\\SqlCustomFunctions\\IPFunctions.cs",
"RelativeToolTip": "IPFunctions.cs",
"ViewState": "AgIAADUAAAAAAAAAAAAqwBkAAAAAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-07-10T13:15:33.845Z",
"EditorCaption": ""
}
]
}

View File

@ -1,7 +1,16 @@
{
"Version": 1,
"WorkspaceRootPath": "C:\\Repos\\SqlCustomFunctions\\",
"Documents": [],
"Documents": [
{
"AbsoluteMoniker": "D:0:0:{1CE29CD9-8ED4-497C-A794-85FA3BA3B87F}|SqlCustomFunctions.sqlproj|C:\\Repos\\SqlCustomFunctions\\ClsConversions.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{1CE29CD9-8ED4-497C-A794-85FA3BA3B87F}|SqlCustomFunctions.sqlproj|solutionrelative:ClsConversions.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{1CE29CD9-8ED4-497C-A794-85FA3BA3B87F}|SqlCustomFunctions.sqlproj|C:\\Repos\\SqlCustomFunctions\\IPFunctions.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{1CE29CD9-8ED4-497C-A794-85FA3BA3B87F}|SqlCustomFunctions.sqlproj|solutionrelative:IPFunctions.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
}
],
"DocumentGroupContainers": [
{
"Orientation": 0,
@ -9,7 +18,7 @@
"DocumentGroups": [
{
"DockedWidth": 200,
"SelectedChildIndex": -1,
"SelectedChildIndex": 11,
"Children": [
{
"$type": "Bookmark",
@ -54,6 +63,32 @@
{
"$type": "Bookmark",
"Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}"
},
{
"$type": "Document",
"DocumentIndex": 0,
"Title": "ClsConversions.cs",
"DocumentMoniker": "C:\\Repos\\SqlCustomFunctions\\ClsConversions.cs",
"RelativeDocumentMoniker": "ClsConversions.cs",
"ToolTip": "C:\\Repos\\SqlCustomFunctions\\ClsConversions.cs",
"RelativeToolTip": "ClsConversions.cs",
"ViewState": "AgIAACAAAAAAAAAAAAAqwDUAAABeAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-09-23T11:04:08.946Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 1,
"Title": "IPFunctions.cs",
"DocumentMoniker": "C:\\Repos\\SqlCustomFunctions\\IPFunctions.cs",
"RelativeDocumentMoniker": "IPFunctions.cs",
"ToolTip": "C:\\Repos\\SqlCustomFunctions\\IPFunctions.cs",
"RelativeToolTip": "IPFunctions.cs",
"ViewState": "AgIAADUAAAAAAAAAAAAqwBkAAAAAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-07-10T13:15:33.845Z",
"EditorCaption": ""
}
]
}

View File

@ -45,16 +45,17 @@ namespace SqlCustomFunctions
[Microsoft.SqlServer.Server.SqlFunction()]
static public SqlDateTime dtFirstDayOfMonth(SqlDateTime InDate)
{
SqlDateTime rv = DateSerial(InDate.Value.Year, Convert.ToInt16(InDate.Value.Month), 1);
SqlDateTime rv = dtSerial(InDate.Value.Year, Convert.ToInt16(InDate.Value.Month), 1);
return rv;
}
[Microsoft.SqlServer.Server.SqlFunction()]
static public SqlDateTime dtLastDayOfMonth(SqlDateTime InDate)
{
SqlDateTime rv = DateSerial(InDate.Value.Year, Convert.ToInt16(InDate.Value.Month + 1), 0);
SqlDateTime rv = dtSerial(InDate.Value.Year, Convert.ToInt16(InDate.Value.Month + 1), 0);
return rv;
}
[Microsoft.SqlServer.Server.SqlFunction()]
public static SqlDateTime dtSerial(int year, short month, short day)
{
if (year < 0)

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

View File

@ -1,11 +1,7 @@
C:\Repos\SqlCustomFunctions\obj\Release\SqlCustomFunctions.sqlproj.AssemblyReference.cache
C:\Repos\SqlCustomFunctions\bin\Release\SqlCustomFunctions.dacpac
C:\Repos\SqlCustomFunctions\bin\Release\SqlCustomFunctions.dll
C:\Repos\SqlCustomFunctions\bin\Release\SqlCustomFunctions.pdb
C:\Repos\SqlCustomFunctions\obj\Release\SqlCustomFunctions.sqlproj.AssemblyReference.cache
C:\Repos\SqlCustomFunctions\obj\Release\SqlCustomFunctions.sqlproj.CoreCompileInputs.cache
C:\Repos\SqlCustomFunctions\obj\Release\SqlCustomFunctions.dll
C:\Repos\SqlCustomFunctions\obj\Release\SqlCustomFunctions.pdb
C:\Repos\SqlCustomFunctions\bin\Release\SqlCustomFunctions.dll
C:\Repos\SqlCustomFunctions\bin\Release\SqlCustomFunctions.pdb
C:\Repos\SqlCustomFunctions\obj\Release\Model.xml
C:\Repos\SqlCustomFunctions\obj\Release\refactor.xml
C:\Repos\SqlCustomFunctions\obj\Release\postdeploy.sql
C:\Repos\SqlCustomFunctions\obj\Release\predeploy.sql