title Current Time: Automation Classes | Microsoft Docs ms.custom ms.date 11/04/2016 ms.reviewer ms.suite ms.technology cpp-windows ms.tgt_pltfrm ms.topic reference dev_langs C++ helpviewer_keywords time, setting current current time, COleDateTime object procedures, getting current time Automation classes, current time time, getting current ms.assetid cc967f17-1189-4cf3-85f9-1969462d5f72 caps.latest.revision 10 author mikeblome ms.author mblome manager ghogen translation.priority.ht cs-cz de-de es-es fr-fr it-it ja-jp ko-kr pl-pl pt-br ru-ru tr-tr zh-cn zh-tw Current Time: Automation Classes The following procedure shows how to create a COleDateTime object and initialize it with the current time. To get the current time Create a COleDateTime object. Call GetCurrentTime. [!code-cppNVC_ATLMFC_Utilities#177] See Also Date and Time: Automation Support