Insert date in an Excel cell

CamiCat

Member
Hello friends,

I should insert a date like "01012019" in one cell in an Excel file.
If I save the date as a text variable and put it in the cell, it saves the value as 1012019.
How can I save the date with the "0" at the beginning??
Thank you so much,
Camilla :)
 

Attachments

  • date to insert.png
    152.8 KB · Views: 55

CamiCat

Member
Thank you @amador.
Can you please provide me a screenshot of how is it possible to format the cell as a "text"?
I don't know how to do that. :)
The solution of insertinf the apostrophe is not possible since the file Excel should be charged on SAP, and the presence af the apostrophe would not be correct.
Thank you,
Camilla.
 

amador

Member
Just format the column to text and when you write the value into the excel, I think it will retain the formatting.
 

VJR

Well-Known Member
To format the cell as Text use the 'Format Cell' action of the Excel VBO and set the Cell Format parameter as "@".
You can use this to format a single cell or a range of cells. First format the cell and then insert the date as "01012019".
 

CamiCat

Member
Hello @VJR,
I tried your solution of formatting the cell and then insert the date as "01012019".
It worked perfectly.
Thank you so much,
Camilla
 
  • Like
Reactions: VJR
To format the cell as Text use the 'Format Cell' action of the Excel VBO and set the Cell Format parameter as "@".
You can use this to format a single cell or a range of cells. First format the cell and then insert the date as "01012019".
Hi Vj,
Can you please guide me how to convert the text field into date using the Column Format action? what would be the cell Format please?

Thanks
Priya
 

edwards142

New Member
Follow down the steps to insert date in excel cell:

On your worksheet, choose the cell in which you need to apply or insert date.

After that perform any one of the following procedures:

For the insertion of current date, press Ctrl+; (semi-colon).

For the insertion of current time, press Ctrl+Shift+; (semi-colon).

For the insertion of both current date and time, press Ctrl+; (semi-colon), then press Space, and then press Ctrl+Shift+; (semi-colon).

Most of the users found reporting about Excel Not Recognizing Date Format error for the m i want to share this helpful post.
 
Top