Hello,
I have this code :
The resulting message is :
I have this code :
B4X:
cSqlCegid = $"SELECT * FROM [dbo].[Z_IAUDITOR] where DATE_AUDIT <= CONVERT( date, DATEADD(day, ${nDays}, GETDATE()))
and DATE_AUDIT >= CONVERT( date, GETDATE())
"$
Dim cMsg as String
cMSg = $"
Date run : ${DateTime.Date(DateTime.Now)}
Sql Query :
${cSqlCegid}
"$
smtp.Initialize(SMTP_server, SMPT_Port, SMTP_Username, SMTP_Password, "SMTP_Audits")
smtp.HtmlBody = False
smtp.Body = cMSg
...
smtp.send
The resulting message is :
Date run : 06/10/2022
Sql Query :
SELECT * FROM [dbo].[Z_IAUDITOR] where DATE_AUDIT <=NVERT( date, DATEADD(day, 4, GETDATE()))
and DATE_AUDIT >=NVERT( date, GETDATE())