# Function: ufnGetAccountingEndDate

## Properties

Property | Value
--- | ---
Name | ufnGetAccountingEndDate
ID | 2123154609
Schema | dbo
Owner | dbo
Execute As | Caller
Type | SQL SCALAR FUNCTION
Uses Ansi Nulls |
Uses Quoted Identifier |
Is Schema Bound |
Uses Database Collation |
Null on Null Input |
Encrypted |
MS Shipped |
Published |
Schema Published |
Deterministic |
Precise |
System Verified |
System Data Access |
User Data Access |
Modify Date | 8/8/2010 5:23:46 PM
Creation Date | 8/8/2010 5:23:46 PM

## Extended Properties

Name | Value
--- | ---
MS_Description | Scalar function used in the uSalesOrderHeader trigger to set the starting account date.

## Permissions

No object level permissions defined.

## Parameters

No function parameters defined.

## Recordset Returned

Datatype | Has Default Value | Default Value | Xml Document | Description
--- | --- | --- | --- | ---
datetime |  |  |  |

## Objects that depend on [ufnGetAccountingEndDate]

- dbo.ufnGetAccountingEndDate
  - Sales.SalesOrderHeader
    - Sales.SalesOrderDetail
      - Sales.iduSalesOrderDetail
      - Sales.ufn_SalesByStore
    - Sales.SalesOrderHeaderSalesReason
    - Sales.uSalesOrderHeader
    - Sales.vSalesPersonSalesByFiscalYears

## Objects on which [ufnGetAccountingEndDate] depends

- dbo.ufnGetAccountingEndDate

## SQL

Script
SET ANSI_NULLS ON SET QUOTED_IDENTIFIER ON CREATE FUNCTION [dbo].[ufnGetAccountingEndDate]() RETURNS [datetime] AS BEGIN RETURN DATEADD(millisecond, -2, CONVERT(datetime, '20040701', 112)); END; EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Scalar function used in the uSalesOrderHeader trigger to set the starting account date.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'FUNCTION',@level1name=N'ufnGetAccountingEndDate'

#### See also

List of Functions