Monthago
  Home FAQ Contact Sign in
 
Advanced search
MATCHING GROUPS



more...
POPULAR GROUPS

more...

found 6 articles for 0.302 sec
When comparing datetime objects remember this: <Past> -lt <Present> -and <Future> -gt <Present> # but this command does not compare [datetime] objects, > $DataDir = Get-ChildItem | Where {$_.CreationTime.ToString('MMddyyyy') -gt $monthago} # it compares [string] objects, you could get erroneus results # comparing dates as strings 07032008 -lt 08172008 # OK 07032008 -lt 08172007 # oops! #     

Group: microsoft.public.windows.powershell · Group Profile · Search for Monthago in microsoft.public.windows.powershell
Author: Kiron
Date: Sep 16, 2008 09:54

I think the comparison is not working because you compare strings, not dates. Try: $monthago = ( get-date ).AddDays(-30) ... $DataDir = Get-ChildItem | Where {$_.CreationTime -gt $monthago} (i cut the ToString method) On 16 Zář, 16:31, tERRY <tE...@discussions.microsoft.com> wrote: I'm writing a script to archive dat files more than a month old but the date comparison isn't working
Show full article (1.05Kb) · Show article thread
On Sep 16, 9:31 am, tERRY <tE...@discussions.microsoft.com> wrote: > I'm writing a script to archive dat files more than a month old but the date > comparison isn't working. Here's the script: > # Archive_Vis_Data.ps1 > # Archive Visualizer data in the "Daily Data Analysis" directory > > # Step 1: set the starting location > SL "C:\WindowsPowerShell\Test\Daily Data Analysis" > > # Step 2:     

Group: microsoft.public.windows.powershell · Group Profile · Search for Monthago in microsoft.public.windows.powershell
Author: cerna.zelva
Date: Sep 16, 2008 09:47

On Sep 16, 9:31 am, tERRY <tE...@discussions.microsoft.com> wrote: I'm writing a script to archive dat files more than a month old but the date comparison isn't working. Here's the script: # Archive_Vis_Data.ps1 # Archive Visualizer data in the "Daily Data Analysis" directory # Step 1: set the starting location SL "C:\WindowsPowerShell\Test\Daily Data Analysis" # Step 2:
Show full article (2.42Kb) · Show article thread
I'm writing a script to archive dat files more than a month old but the date comparison isn't working. Here's the script: # Archive_Vis_Data.ps1 # Archive Visualizer data in the "Daily Data Analysis" directory # Step 1: set the starting location SL "C:\WindowsPowerShell\Test\Daily Data Analysis" # Step 2: calculate the date 30 days ago $monthago = ( get-date ).AddDays(-30).ToString('MMddyyyy'     

Group: microsoft.public.windows.powershell · Group Profile · Search for Monthago in microsoft.public.windows.powershell
Author: RickB
Date: Sep 16, 2008 08:32

From The Sunday Times November 11, 2007 Manhattan transfer Greg Truman With the dollar at its lowest level against sterling for a generation, even the sky-high prices of New York real estate are tempting British investors Londoner Maggie Dimmock, 61, used to be content with quick trips across the pond for an exhilarating dose of New York bustle and boldness. Now she and many other Britons
Show full article (2.28Kb) · Show article thread
    

Group: microsoft.public.windows.powershell · Group Profile · Search for Monthago in microsoft.public.windows.powershell
Author: RickB
Date: Sep 16, 2008 08:31

Show full article (2.28Kb) · Show article thread
    

Group: microsoft.public.windows.powershell · Group Profile · Search for Monthago in microsoft.public.windows.powershell
Author: tERRY
Date: Sep 16, 2008 07:31

Show full article (1.55Kb)
    

Group: misc.invest.realestate · Group Profile · Search for Monthago in misc.invest.realestate
Author: Faubillaud
Date: Nov 12, 2007 00:19

Show full article (10.25Kb)