Current Date
Author: magicgb
Creation Date: 9/29/2008 4:53 PM
profile picture

magicgb

#1

How would I write these statments?

if GetDate(Bar)>=CurrentDate then

or

if GetDate(Bar)>=20080826 then


profile picture

Eugene

#2
See (a more general) answer in WL5 FAQ: "An equivalent WealthScript function can't be found."

DateTime represents a date and time in C#. CurrentDate is DateTime.Now. Date/time comparison can be made through DateTime.Compare. The web is full with helpful tutorials on date manipulation in C# such as this one.

For more examples, see QuickRef entries that deal with the Date structure e.g. ExitDate property or the included Bad History Data Check strategy.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).