# append '[]' to the type name in the array declaration
[datetime[]]$dt_array = @()
# append the DateTime value from each column with the '+=' operator
# to the datetime array in the While loop
$dt_array += $rdr['datetime']
--
Kiron
# append '[]' to the type name in the array declaration
[datetime[]]$dt_array = @()
# append the DateTime value from each column with the '+=' operator
# to the datetime array in the While loop
$dt_array += $rdr['datetime']
--
Kiron
| Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| remove last element from an array | sardinian_guy | PowerShell | 4 | 26 Jul 2009 |
| Location an Array Element | Tim Munro | PowerShell | 4 | 06 Jan 2009 |
| How to create a hash table from an array | RickB | PowerShell | 2 | 08 Aug 2008 |
| Re: help needed converting c# array declarations to work inpowershell | Oisin (x0n) Grehan [MVP] | PowerShell | 0 | 04 Jun 2008 |
| Converting array elements between types | Kryten | PowerShell | 6 | 01 Mar 2008 |