This project has moved and is read-only. For the latest updates, please go here.

New macro %datetime%

Feb 12, 2014 at 10:14 AM
Hi, I've just uploaded a patch (ID 15844) that creates a new macro %datetime%, which works exactly as the standard FTP and FILE adapters' %datetime% macro.
The SFTP macro %DateTime% uses the current locale's settings, which, for a service, generally is US English. The %datetime% macro expands to current date and time in UTC using format string "yyyy-MM-ddTHHmmss".
Happy coding!
Peter Lindgren
Mar 1, 2014 at 12:48 AM
Thanks Peter,
I currently don't have access to a VS 2010 environment, so I can't implement you changes right now. I plan to install one shortly though ;)

May 8, 2014 at 9:25 AM
That change isn't dependent on .Net 4 (VS 2010), is it?
Anyway, the patch I uploaded (15844) is in production at a customer's site since a couple of months, and it works fine.
May 8, 2014 at 2:29 PM
Hi Peter
I have installed the latest version Blogical.Shared.Adapters.Sftp_v1.5 and im trying to use %datetime%.

But i get some issues. first of all i have to wirte datetime like this %DateTime% to work.

With %datetime% the file name becomes Test_T_AP_GITEK_ALL_%datetime%

The second issue is that the datetime in the file name has a space between date and time like: Test_T_AP_GITEK_ALL_08.05.2014 152000.

shouldnt it be a "T" between date and time ?

May 8, 2014 at 2:47 PM
Did you download and apply the patch 15844? The patch isn't approved yet, so it's not included in the official download. The existing %DateTime% macro expands to the local time of the computer with the formatting of the host instance users's locale (regional settings). The new %datetime% macro should expand to 2014-05-08T152000 with your data above.
May 8, 2014 at 3:23 PM
Hi Peter

Thanks for the quick replay.

I havent applied the patch. Im new to BTS and its the first adapter i have installed.

Do you have a "how to" to apply a patch.

May 9, 2014 at 7:31 AM
I don't know how much experience you have with Visual Studio, but in general terms you have to download the source code, then download the patch you are interested in and overwrite the original source code with the patch. Then compile and build the project. Then you have to install your version of the adapter in BizTalk.
Hope this will get you started!
Aug 8, 2014 at 8:34 AM
The new version 1.6 published recently now includes this macro, just download and install/update.