Date in Notebook

Hi you all,
When I create a new automation with StudioX, a new notebook is always generated automatically. However, the “Date” sheet never shows me the correct format. Do you have any tips on how to get the correct values?

Hi @ppe54983 ,
You can try this.

– Make sure the format of the date in the input data is correct. If the input data is not in the correct format, the output will also not be in the correct format. You can use the “Format Date/Time” activity to convert the input data into the desired format.
– Check the system date and time format settings. The date format in UiPath StudioX may be affected by the date and time format settings of your computer. You can check and change the date and time format settings by going to Control Panel > Clock and Region > Date and Time.
– Use the “Write Cell” activity to write the date to the “Date” sheet. When using the “Write Cell” activity, make sure to set the value of the cell to the correct format using the “Format Value” option.
– Use the “Invoke Code” activity to write the date to the “Date” sheet. You can use VB.NET or C# code to write the date to the “Date” sheet and specify the format of the date.

Let me send a VB.NET code here,
Dim currentDate As String = DateTime.Now.ToString(“dd/MM/yyyy”)
Workbook.Worksheets(“Date”).Range(“A1”).Value = currentDate

This will work. If you like it please mark it as a solution incase others face similar problem/question.
Happy Automation. :white_check_mark: :grinning: :writing_hand:

Pratik Maskar

Hi Pratik,

first of all thank you very much for your quick feedback. Unfortunately, I could not follow you everywhere on the individual points.

  • the value for date (input) is the correct one. what you mean with the “Format Date/Time” activity and where I can find it?
  • the date and time format settings are the right ones.
  • what do i have to write in the write cell activity with the dates? For today’s date it worked. But how does it work for the rest of the cells?
  • how exactly does your last option work?

Thanks in advance!

Hi @ppe54983 ,

Can you elaborate what exactly are you expecting when you say “Date” sheet never shows me the correct format, so that I can give you an exact solution