How to enter date in same format to Excel

I have Created a DateTable which contains column Start_Date and its DataType is String.

I have used Assign Activity and Created a Variable named it as Start_Date and
DataType is String and Value is “2020-04-01 00:00:00”

d3

When I use Write DataTable to Excel Activity it enters date into excel with different format:

d2

I want Date to be inserted in following format:

“yyyy-mm-dd hh:mm:ss”

Need help to solve this issue, highly appreciate any help.

Hi @mavsp8,

Hope you convert and write it like below

if possible share your workflow

Thanks,

@mavsp8

You have to modify the excel cell formatting if you need to view that way…format cell is the activity

Cheers

Hey @mavsp8,

It is the excel functionality, so better if you add apostrophes (‘) before the date string and then write to excel it will solve your issue.

For better understanding you can go through Stop automatically changing numbers to dates - Microsoft Support

Thanks,
Sanjit

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.