Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Format Yesterday's Date
#1
I have some code that just seems like a lot is going on to get yesterdays date...
Function GetVillageSoupCompanyData
Code:
Copy      Help
DateTime d.FromComputerTime
d.AddStr("-1")
DATE dd=d.ToDATE
str FileDate.timeformat("{MMM}_{dd}_{yyyy}" dd)

Is there a better way (less lines of code) to do this?

-Jim
#2
Macro Macro2430
Code:
Copy      Help
DateTime d.FromComputerTime
d.AddParts(-1)
;str FileDate.timeformat("{MMM}_{dd}_{yyyy}" d)
;or
str FileDate=d.ToStrFormat("{MMM}_{dd}_{yyyy}")


Forum Jump:


Users browsing this thread: 1 Guest(s)