Forum Discussion
JFP_Vendmaster
Mar 31, 2020Copper Contributor
Excel 2007, Converting microseconds to seconds in multiple cells all at time.
Hello, looking to see how to convert a group of cells from microseconds to seconds. Example: 4000 to 4.00, 15200 to 15.20 --- the below cells are in microseconds and I need to convert them to seco...
- Jul 26, 2022
Yes, You have some things to consider in your script.
First $uidnum is invalid as it return the user DN "CN=User,DC=MyDC ...." not the employeeID
Second , you need to cast the $empid to be Int not String otherwise the int conversion will fail.
Here is an update
Please Check and let me know
$allusers = Get-ADUser -Filter "employeeID -ge 0" -Properties Name,employeeID,uidNumber foreach ($user in $allusers) { [int]$empid = (Get-ADUser $user -Property EmployeeID).EmployeeID if ($user.uidNumber -eq $null) { $uidnum = "1"+'{0:d5}' -f $empid Set-ADUser -Identity $user.SamAccountName -Replace @{uidNumber=$uidnum} } }
Ardus_Petus
Apr 01, 2020Copper Contributor
I guess you meant milliseconds.
Enter 1000 in a cell, select it and type Ctrl-c
select your raw data (in milliseconds)
click Paste>Special Paste, select Division and hit Enter
That will divide all your numbers by 1000
Now, format your data as numbers with 3 decimal places<;
That's it!
HTH,
--
LR
Enter 1000 in a cell, select it and type Ctrl-c
select your raw data (in milliseconds)
click Paste>Special Paste, select Division and hit Enter
That will divide all your numbers by 1000
Now, format your data as numbers with 3 decimal places<;
That's it!
HTH,
--
LR