0

I have a vbs file that queries the domain as below

queryTxt = "<"& domainname &">;" & _
  "(&(objectclass=user)(objectcategory=person));" 


queryTxt = queryTxt & "SAMAccountName,whenchanged"

But in some servers "whenchanged" is returning values as "8/18/2014 1:20:30 AM" and in some as "12-08-2014 04:54:58". I want to have the returning value as the first date format.

How to update the query so that I get a unique date format.

itsraja
  • 1,640
  • 4
  • 32
  • 48

1 Answers1

0

Queries to the whenChanged attribute return a Date value, so the display format is governed by the regional settings of the computer displaying the query results. Either change the date format in the computer's regional settings, or use a StringBuilder object for building a custom date format.

Community
  • 1
  • 1
Ansgar Wiechers
  • 193,178
  • 25
  • 254
  • 328