Skip to Content
author's profile photo Former Member
Former Member

ToDate() function not working

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?

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    Posted on Sep 21, 2010 at 04:06 PM

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

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      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?

  • author's profile photo Former Member
    Former Member
    Posted on Sep 21, 2010 at 11:26 AM

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

    Hope this helps you.

    Regards,

    Rohit

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.