This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

name csv-file with date in format yymmdd
#1
Hi Daniel,

I've made new thread  Smile

Do you mean: filename = os.date("%f",d)'test.csv'


os.date("%F",d) this will give you date in such format 2020-03-06


PS. Please create new thread when you can't find relevant to your question.
Gr.
Geert
Reply
#2
Use "%y%m%d" format.
Reply
#3
Hi,

My csv-filename I have to send changes for different buildings. So I made the filename variable in the beginning of the script: 

8 Filename = os.date("%y%m%d")'2714_functietest.csv'

44 res, err = mailattach(ToServiceEmail, Subject, Message , Filename, csv, 'text/csv')

By executing the script I got error:
Resident_script: 8: attempt to call a string value
stack traceback

What am I doing wrong?
Gr.
Geert
Reply
#4
Use .. to concatenate two strings:
Code:
Filename = os.date("%y%m%d") .. '2714_functietest.csv'
Reply
#5
It's working Thx!
Gr.
Geert
Reply


Forum Jump: