• In .NET the preferred way to handle this is to use the ToSTring function with a Format specified. Like this:

    Now.ToString("yyyyMMddhhmmss")