Categories
Bizagi Tips and Tricks

Date, DateTime data types

Convert Date or DateTime to String data type

var sDateTimeFormatted = dDateTime.ToString("MM/dd/yyyy hh:mm");
var sDateFormatted = dDate.ToString("MM/dd/yyyy");

Or you could use String.Format

var sDateFormatted = System.String.Format("{0:d}",DateTime.Now);

Use this to convert it for XML

var dTransactionDate = DateTime.Now;
var sTransactionDate = XmlConvert.ToString(dTransactionDate, XmlDateTimeSerializationMode.Unspecified);

Dates as filters for entities

[dDateDelivered != null AND dDateDelivered >= '08/22/2019 12:00:00 AM']

Bizagi’s way

<format-date(<XPath>,"format")>