Does anyone know how I can get "9/19/2019 12:00 AM" to be "YYMMDD" in a Data Source?

OSAdmin
Valued Contributor
Originally posted by Eric Osmanski

1/8/2020

Does anyone know how I can get "9/19/2019 12:00 AM" to be "YYMMDD" in a Data Source?

1 REPLY 1

OSAdmin
Valued Contributor
Originally posted by Nick Kroppe

Dim varDate As DateTime = DateTime.Parse(""9/19/2019 12:00 AM"", CultureInfo.InvariantCulture)
Dim formattedDate As String = varDate.ToString(""yyyyMMdd"", CultureInfo.InvariantCulture)
brapi.ErrorLog.LogMessage(si, ""Date: "" & formattedDate)