Cloud Workflow
Raise an IssueJoin Community
  • Getting Started
    • Introduction
    • Integration Basics
    • Sign Up and Get a License
    • Features and Benefits
  • DBSync Platform
    • Core Components
    • System Requirements
    • AppCenter
      • Company and User Management
    • Development Studio
    • Security Features
  • iPaaS
    • Home
    • Apps
    • Extend
      • Functions
    • Administration
      • User & Role Management
    • Logs
    • Remote Agent
    • Published Templates
  • Create your Workflow
    • Project
    • Task
    • Flow Builder
      • Standard Functions
    • Actions
      • Flow
      • Variable
      • Transform and Write
      • SQL
      • Restructure
      • Query
      • Debug
      • ReST
      • Conditions
        • If (Condition)
        • For (Loop)
      • Storage
        • Dropbox
        • File
        • CSV
        • Google Drive
        • FTP
        • S3
      • Flow Management
        • Flow
        • Logs
        • Notification
        • Schedule
        • API
        • Webhook
        • Forms
    • Configuring DBSync Environment
  • Connectors
    • Amazon S3
    • Authorize.NET
    • ChannelAdvisor
    • Database
    • Dropbox
    • FTP
    • Google Drive
    • Google Sheets
    • HubSpot
    • JIRA Cloud
    • JIRA Service Management
    • Linnworks
      • Creating the DBsync Application on Linnworks Developer Instance
    • Mailchimp
    • Microsoft Dynamics 365 Business Central
    • Microsoft Dynamics 365 Finance and Operations (D365 F&O)
    • Microsoft Dynamics CRM Online
    • Microsoft Dynamics GP
    • Microsoft Dynamics NAV
    • monday.com
    • Narvar
    • NetSuite
      • NetSuite Connector Settings
    • OpenAPI
    • PointClickCare
    • QuickBooks Desktop
    • QuickBooks Online
    • Sage Intacct
    • Salesforce
    • ShipStation
    • Shopify
    • SkuVault
    • WooCommerce
  • Template Library
    • Salesforce to QuickBooks Online Order to Cash
    • Salesforce to QuickBooks Desktop Order to Cash
    • Salesforce to FTP Integration
    • QuickBooks Online to Salesforce Accounts Receivable
    • QuickBooks Desktop to Salesforce Accounts Receivable
    • QuickBooks Online to Business Central Integration
    • QuickBooks Online to ShipStation Orders
    • QuickBooks Desktop to Shipstation Orders
    • QuickBooks Desktop to monday.com Integration
    • QuickBooks Online to monday.com Integration
    • Shopify to QuickBooks Online
    • Shopify to QuickBooks Desktop
    • Linnworks Orders to QuickBooks Online
    • Linnworks Orders to QuickBooks Desktop
    • Linnworks to Salesforce Integration
    • Salesforce Litify and QuickBooks Online
    • Salesforce Litify and QuickBooks Desktop
    • HubSpot to QuickBooks Online Order to Cash
    • HubSpot to QuickBooks Desktop Order to Cash
    • SkuVault Orders to QuickBooks Desktop
    • SkuVault Orders to QuickBooks Online
    • SkuVault and Salesforce
    • ChannelAdvisor Orders and Salesforce
    • ChannelAdvisor and QuickBooks Online
    • ChannelAdvisor and QuickBooks Desktop
    • Shopify Orders to Dynamics365 CRM
    • Shopify Orders to Salesforce
    • ShipStation to Dynamics 365 CRM
    • ShipStation Orders to Salesforce
    • ShipStation to QuickBooks Online Orders
    • ShipStation to QuickBooks Desktop
    • Target Recruit to QuickBooks Online
    • Target Recruit to QuickBooks Desktop
    • QuickBooks Online to Database
    • QuickBooks Desktop to Database
  • Troubleshooting
    • Common Errors & Fixes
    • Adding Trusted IP Address in Salesforce
    • Installing QuickBooks Web Connector
    • QuickBooks to Salesforce Data Migration
    • Setting Password in QuickBooks Web Connector
    • Starting QuickBooks Web Connector
    • Update Salesforce Password & Security Token in DBSync
  • Additional Resources
    • Billing Information - Auto Renewal
  • Tutorials
    • Salesforce and QuickBooks
      • Account Hierarchy in Salesforce and QuickBooks
      • Account Owner Mapping
      • Resolving Email Fields Sync Issues in QuickBooks Online
      • Mulitple Price Levels in Salesforce QuickBooks Integration
      • Multicurrency in QuickBooks to Salesforce Integration
      • Multicurrency in Salesforce - QuickBooks Desktop Integration
      • Multicurrency in Salesforce QuickBooks Online Integration
      • Product Hierarchy in QuickBooks and Salesforce
      • QuickBooks Data Extraction Queries
      • QuickBooks File Backup and Recovery Process
      • QuickBoooks Reports to Salesforce Integration
      • Recurring Transactions to Accounting System
      • Retrieve Value from custom Field of QuickBooks Online
      • Salesforce Opportunity to QuickBooks - Disabling Jobs
      • Salesforce QuickBooks Custom Mappings
        • Use Case
      • Salesforce QuickBooks Integration with Multiple QuickBooks
      • Syncing Standard Group Line Items in QuickBooks Desktop
    • Using Date Function in DBSync Integration
    • Salesforce and Database
      • Database to Salesforce Integration
    • Database to Database
      • Database to Database Integration
Powered by GitBook
On this page
  • Using Date function in DBSync
  • MySQL to Salesforce Integration
  • Salesforce to MySQL Integration
  • SQL Server to Salesforce Integration
  • Salesforce to SQL Server Integration
  1. Tutorials

Using Date Function in DBSync Integration

Using Date function in DBSync

Date has always been one of the most complex functions to be used in integration. DBSync has in-built date function that can be used in the mappings to convert date from source to target format. Along with the in-built date function, you can also utilize the date functions of various databases to convert the date at query level.

MySQL to Salesforce Integration

Using MySQL DATE_FORMAT() function: When we are reading from MySQL database, we can use MySQL functions in Reader query. We can use MySQL built-in Function DATE_FORMAT() to get the date in Salesforce format. For Example, take a table as shown below. Now we will query the table and get the output date in Salesforce format using DATE_FORMAT() function.

Table Name: DBAccount

AccountName

BillingStreet

AnnualRevenue

LastModifiedDate

ABC

123, Ginger Street

50000.00

2010-03-15 00:00:00

Query:

SELECT AccountName, BillingStreet, AnnualRevenue, DATE_FORMAT(LastModifiedDate,'%Y-%m-%dT%H:%i:%sZ') AS 'LastModifiedDate' FROM DBAccount.

Result:

ABC

123, Ginger Street

50000.00

2010-03-15T00:00:00Z

Using DBSync DATE() Function

We can also use the Date function of DBSync to convert MySQL Date into Salesforce format. An example is shown below:

TargetField = DATE (DATE (VALUE("Source_Field"),"yyyy-MM-dd hh:mm:ss") ,"yyyy-MM-dd'T'HH:mm:ss'Z'").

Salesforce to MySQL Integration

Using DBSync DATE() Function: We can also use the Date function of DBSync to convert Salesforce Date into MySQL format. An example is shown below: TargetField = DATE(VALUE("Source_Field"),"yyyy-MM-dd hh:mm:ss").

Using DBSync LSPLIT() & RSPLIT() Functions: We can use DBSync's LSPLIT() and RSPLIT() functions to convert a Date from Salesforce to MySQL Format. An Example is shown below: TargetField = LSPLIT(LSPLIT(VALUE("CreatedDate"),"."),"T") + " "+RSPLIT(LSPLIT(VALUE("CreatedDate"),"."),"T"). Using DBSync DATE() Function: We can also use the Date function of DBSync to convert MySQL Date into Salesforce format. An Example is shown below: TargetField = DATE (DATE (VALUE("Source_Field"),"yyyy-MM-dd hh:mm:ss") ,"yyyy-MM-dd'T'HH:mm:ss'Z'").

SQL Server to Salesforce Integration

Using SQL Server CONVERT() & CAST() functions: When we are reading from SQL Server database in DBSync - while writing the Reader query - we can use MySQL built-in Functions CONVERT() and CAST() to get the date in Salesforce format. For Example, take a table as shown below. Now we will query the table and get the output date in Salesforce format using CONVERT() function.

Table Name: DBAccount:

AccountName

BillingStreet

AnnualRevenue

LastModifiedDate

ABC

123, Ginger Street

50000.00

2010-03-15 00:00:00.000

Query:

SELECT AccountName,BillingStreet,AnnualRevenue,convert(varchar,cast(DBAccount.LastModifiedDate as datetime),126) as 'LastModifiedDate' FROM DBAccount. 

Result:

ABC

123, Ginger Street

50000.00

2010-03-15T00:00:00

Salesforce to SQL Server Integration

When integrating data from Salesforce to SQL Server, we can map the DateTime field from Salesforce to SQL Server Directly.

PreviousSyncing Standard Group Line Items in QuickBooks DesktopNextSalesforce and Database

Last updated 1 month ago