cancel
Showing results for 
Search instead for 
Did you mean: 

ToDate() function not working

Former Member
0 Kudos
4,957

I need to convert string to Date type and use it in the DaysBetween function.

Created a variable =ToDate("01/10/2010"; "dd/mm/yyyy").

The output for this becomes 01/01/2010.

What can I do to make the ToDate() function work?

Accepted Solutions (1)

Accepted Solutions (1)

arijit_das
Active Contributor
0 Kudos

As already suggested, you have to use the format =ToDate("01/10/2010"; "dd/MM/yyyy") as mm stands for minutes.

Former Member
0 Kudos

Many thanks. It's working now

Former Member
0 Kudos

In my case it doesn't work though it's yyyy/MM/dd. Below is the scenario.

The reports required to show currentdate as a column in date format as yyyy/MM/dd (Eg: 2015/06/18). As the BO locale is UK, currentdate returns 18/06/2015.

The date is then converted using Formatdate as below, that returns a string

Formula:

=Formatdate(Currentdate();"yyyy/MM/dd")

Output: String

2015/06/18

Now we need it as date, so here's what I did.

Formula:

=ToDate(Formatdate(Currentdate();"yyyy/MM/dd");"yyyy/MM/dd")

Output: Date

18/06/2015

Any good suggestions please?

Answers (1)

Answers (1)

Former Member
0 Kudos

I guess the date format in BO is "dd/MM/yyyy". mm represents the minutes in web-I.

Hope this helps you.

Regards,

Rohit