How to convert Julian data to Calendar date in UiPath


I want to convert Julian date to Calendar date in UiPath, specially through assign activity.
Anyone knows how to convert it?

For e.g. I have Julian date : 118072 and it’s calendar value is 13-03-2011 00:00.

Any help would be appreciated.



try this


Hi THIRU_NANI, could you please elaborate more? I’m not getting it, its just Class, but how to use it? an explanation through example would be great help. :slight_smile:


Hope the below steps would help you resolve this

  1. Say you have your input in a string variable named Strinput

  2. Now use a assign activity like this

int_date = 2000+Convert.ToInt33(Strinput.Substring(1,2))

Int_date is of type int32

  1. One more assign activity

int_year = Convert.ToInt32(Strinput.Substring(4))

  1. Then final assign activity like this

stroutput = Datetime(int_year,1,1).AddDays(int_date-1).ToString(“dd-MM-yyyy hh:mm”)

Cheers @Shantanu_More1

Hi Palaniyappan,
I’m trying your solution. But it’s saying “ToInt33 not a member of system.convert”? even though int_date is set to int32. How to resolve this?

Oh sorry that’s a typo
It’s ToInt32


Yeh, and one more typo, int_days should be int_date right?

and I have made variable strouput as System.DateTime. But I’m getting error : ‘Datetime’ is type and can’t be used an expression. For the last assign activity.

That’s right my bad
Refer this

Where stroutput is variable of type string
Not Datetime


Hi, I’m using stroutput as a ‘string’ but the same error. Could you please advise?

Not able to find AddDays in expression.

In case if you have zip file of working code, please share.


1 Like

Aah got it

We need to add New before Datetime like this

stroutput = New Datetime(int_year,1,1).AddDays(int_date-1).ToString(“dd-MM-yyyy hh:mm”)

Stroutput is string variable

Cheers @Shantanu_More1

Hi, I tried this, now it’s not showing any error, but it’s giving wrong output.(wrong calendar date)
I have attached the zip file of the code for your reference.
I have taken julian date as "118072 " and it’s calendar date it coming as “10-07-0077 12:00”.

Shantanu (2.2 KB)

You able to debug my code?
Given approach giving wrong result.

@Parth_Doshi @Pablito @loginerror

If you have any idea, please assist.


Dear @Palaniyappan ,

I have similar issue and tried the output as mentioned above in the above conversation.

I have the dates in the excel column as show in screen shot below. When I check the format it is in custom and in en-US format.


When I read range then the date get converted to a number.

Ex: 24-Jan-2022 equivalent number in data table is 44585

This is the output that I received


Appreciate your feedback as always.


looks more like an OADate

1 Like

Dear Peter,

Thank you it is working. :clap: