Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
date format
#1
I'm trying to get a list of weekend dates to plug into a query prompt ie
Quote:"06052004","06062004"
Here is the code I'm using but it doesnt put the leading "0"s in the month and days. How can I do this?

Code:
DATE d="06/01/2004"
SYSTEMTIME st
int x
str dd ddd tot
tot="'"
rep 30
    st.wDay=x
    d.add(&st)
    dd=d
    ddd.time(d "%A")
    if ddd="Sunday" or ddd="Saturday"
        tot+dd
        tot+"[34],[34]"
    x=1
tot.get(tot 0 ((len(tot))-2))
tot.findreplace("/" "")
outp tot
#2
Code:
DATE d="06/01/2004"
SYSTEMTIME st
str tot="''"
rep 30
,d.tosystemtime(st)
,if(st.wDayOfWeek=0 or st.wDayOfWeek=6)
,,tot.formata("%s'',''" _s.time(d "%m%d%Y"))
,d=d+1
tot.fix(tot.len-2)
out tot


Forum Jump:


Users browsing this thread: 1 Guest(s)