|
Post by honkytonk on Nov 9, 2022 12:43:44 GMT
Hello, I have been trying for a while to retrieve a date with a j (44491) different from the j of this day (44507). This procedure does not work, because the month is retrieved from "todays"
mois$ = "Jan Fév Mar Avr Mai Jun Jui Aou Sep Oct Nov Déc" today$ = date$("mm/dd/yyyy") j = date$(today$) jsem$ = word$("Mar Mer Jeu x Ven Sam x Dim Lun",int((j/7-int(j/7))*10)+1) date$ = jsem$+" "+mid$(today$,4,2)+" "+word$(mois$, val(today$))'+" "+left$(time$(),5)
How could I do? Thank you for.
|
|
|
Post by Rod on Nov 9, 2022 14:28:51 GMT
Not sure if this answers the question.
'this works because val() will only value the string up to the first \ print "The month is ";word$("JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC",val(date$("MM/DD/YY")))
'this works because date$("days") returns the number of days since 1/1/01 mod 7 cycles to day of week print "Today is ";word$("TUE WED THU FRI SAT SUN MON",date$("days") mod 7+1)
'so days=44491 days=44491 print "The month was ";word$("JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC",val(date$(days))) print "The day was ";word$("TUE WED THU FRI SAT SUN MON",days mod 7+1)
|
|
|
Post by honkytonk on Nov 9, 2022 14:48:44 GMT
It's good for the month and the day of the week, but it's missing the day of the month (x of 30-31)
|
|
|
Post by honkytonk on Nov 9, 2022 14:57:39 GMT
I found, I didn't know there was "date$(44491)"
|
|
|
Post by honkytonk on Nov 9, 2022 15:09:51 GMT
Boo sniff; date$() does not take variables As date$(t)
|
|
|
Post by honkytonk on Nov 9, 2022 15:17:21 GMT
So it's work with: date$((t))
|
|
|
Post by plus on Nov 9, 2022 18:29:12 GMT
Works for me?
|
|
|
Post by honkytonk on Nov 10, 2022 10:06:44 GMT
Now with me too. I had to include a chicken bone when trying. And date$ choked on it
|
|