In order to connect the external database to SharePoint online, you can consider deploying the Business Connectivity Services (BCS). First of all, the subscription eligible for the BCS requires an Office 365 Enterprise E3 or E4 subscription. If your Office 365 subscription meets the requirement, please be aware that Business Connectivity Services in a SharePoint Online tenancy can only access data from WCF Data Services and SQL Server Azure Connectors. http://technet.microsoft.com/en-us/library/ee661740(v
Learn how you can set the value of a date variable or field in a SharePoint Designer workflow to be either a static, dynamic, or calculated date.