Changing date/time format in dynamo




Please, could you advise if there is a way to convert the date/time format imported from excel into dynamo to a different format? as follows:

current format: February 08, 2017, 04:47PM
required format: 2018-02-08T16:47 (to suit COBie time format)

Many Thanks


Using OOTB date nodes:

You need to specify the output format following a particular notation that can be found at “Custom Date and Time Format Strings”



Many Thanks for the response, I can’t seem to find the DateTime.Format Node?

I am using revit 2016 and dynamo 1.2.



I believe it was released on Dynamo version 1.3 :slight_smile:


Hi @davebull1979

Try this:

Copy paste this in code block:



Just updated to latest dynamo release and it is now available

Many Thanks.



This also works well.


@davebull1979 Please mark the post as solved. You’re welcome!


@davebull1979 @alvpickmans And here is python magic :smile: