Skip to content

Instantly share code, notes, and snippets.

@aevdokimenko
Created April 30, 2018 18:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aevdokimenko/826a1b34927fa4369260394dfdb29495 to your computer and use it in GitHub Desktop.
Save aevdokimenko/826a1b34927fa4369260394dfdb29495 to your computer and use it in GitHub Desktop.
T-SQL function to return date in Salesforce short date format
-- =============================================
-- Author: Alex Evdokimenko
-- Create date: 2018-04-30
-- Requested by: DBAmp cookbook users
-- Description: Helper function to return date in Salesforce short date format
-- =============================================
Create FUNCTION [dbo].[fn_GetSFShortDate] (@d datetime )
RETURNS NVARCHAR(10)
AS
BEGIN
RETURN cast(cast(@d as date) as nvarchar(10));
END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment