Hi. I’m having some issues with variables combining string and date.
Defined Variables:
- Trx_Recon_Date: DateTime variable to be input through Input dialog and used as part of a file name which is defined in a variable.
- CamboPay_Report_Location: String variable (Default: “D:\Mobile Top Ups\Reconciliation Automation\CamboPay\CamboPay Report on -” + Trx_Recon_Date.ToString(“dd-MMM-yy”) + “.xlsx”).
The series of activities that I’m having are:
- Input dialog (Input date of transaction) => Saved as Trx_Recon_Date. When de-bugging, I typed 6/20/2022
- MsgBox: Trx_Recon_Date.ToString(“dd-MMM-yy”) => When de-bugging, the MsgBox displayed “20-Jun-22”
- MsgBox: CamboPay_Report_Location => When de-bugging, the MsgBox displayed “D:\Mobile Top Ups\Reconciliation Automation\CamboPay\CamboPay Report on -01-Jan-01.xlsx”
Please help to look into this because the expected CamboPay_Report_Location output should be: “D:\Mobile Top Ups\Reconciliation Automation\CamboPay\CamboPay Report on -20-Jun-01.xlsx”
Thank you.
Regards,
Alex