Convert to string

Hi. We’d like to use Description field in Active Directory filled with termination date in UKG. Using this value works but we don’t want the time but the date only.

'Disabled on '+ Employment.DateOfTermination

I’ve tried using 'Disabled on '+ Employment.DateOfTermination.ToShortDateString() but it doesn’t accept it as Description field is expecting a string as a return. So we’re pretty much blind on this and any help will be highly appreciated.

As a last note… is there a published list of properties and methods we can use? So far we’ve been googling but I’m not able to realize what I can use if I want to build a custom query as I now need.

Please try the expression:

"Disabled on " + Employment.DateOfTermination.GetValueOrDefault().ToString(“MM/dd/yyyy”)

All of these expressions are C# expressions, so any valid C# method can be used to transform your data.

Thank you for your reply. I’m not familiar with C# but with PowerShell and .Net.

No worries, if you need help with a specific expression, just post a question here and we are more than happy to provide the required expression

I actually do. As mentioned in the body of this post, I’d like to map Employment.DateOfTermination in a text field in Active Directory as Description is, but only using the short date format as of right now it also gives me the time.

Did you try the previously mentioned expression:

"Disabled on " + Employment.DateOfTermination.GetValueOrDefault().ToString(“MM/dd/yyyy”)

It worked. Thank you so much!

Connect2AD Support - how would I make it populate the current date timestamp that Connect2AD disabled the AD?

so “DISABLED ON mm/dd/yy” that Connect2AD disabled the account (the date there account went to a employement.employeestatus “T”.