Ads by Lake Quincy Media

Wiki Navigation

 
Gibraltar - Learn about the best analysis tool for NLog

Date layout renderer

NLog documentation is a Wiki, which allows registered users to edit its content.
If you want to contribute, please create a user account and contact Jarek to get edit access.

Current date and time. 

Supported in

Configuration Syntax

${date:universalTime=Boolean:format=String:culture=Culture}
Read more about using the Configuration File.

Parameters

  • Rendering Options
  • universalTime - Indicates whether to output UTC time instead of local time.Boolean Default: False
    This parameter is not supported in:
    • NLog v1.0 for .NET Compact Framework 1.0
    • NLog v1.0 for .NET Compact Framework 2.0
    • NLog v1.0 for .NET Framework 1.0
    • NLog v1.0 for .NET Framework 1.1
    • NLog v1.0 for .NET Framework 2.0
  • format - Date format. Can be any argument accepted by DateTime.ToString(format).
  • culture - Culture used for rendering.Culture
Ads by Lake Quincy Media