Hello, I need to check if it is the first run of a process in any given month by comparing current time against a time stored in a variable. this process runs every hour for the first 7 working days, the first run is scheduled to start at 8am on the first day of any month. I have:
dtNow = datetime.now
dtFirstRunTime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1)
the dtFirstRunTime returns the first day of the month with 00:00:00, how to revise it to give me 08:00:00 (am local time)?
or any better way to determine if it is the first run?
thank you so much in advance