0

Date conversion

I have a Date column in my requirement column name is "last_updated" and data format is  "January 8, 2018". 
I need to get this date as "01/08/2018" or  "mm/dd/yyyy"  

Is there any alternate to convert the date in any other format?
 

9replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • Kondala Rao Kandimalla  -- The goal here would be to ensure that Incorta has the column "vaishu.vaish1.Last_Updated" defined as a Date or a Timestamp.  Is this column defined as such?  Assuming it is, you will have full control over how you want to display this on your dashboards.  See the screenshot attached for the formatting options you'd be provided on your dashboard.

    Reply Like
      • Fahim
      • Inmar
      • Fahim
      • 3 mths ago
      • Reported - view

      Dan Brock  I understand that Dan. That's really helpful. 

       

      What if we want to have the date formatted even before our clients/users can use it ( we don't want them to go through that process you just showed above. Just drag and drop) how can we make it happen? Please help. I am reading up on formula columns as we speak. Thanks!

      Reply Like
    • Fahim You can create formula columns in your business views that output these fields as strings which can be formatted however you like using the formatDate() function.  Would that work?

      Reply Like
      • Fahim
      • Inmar
      • Fahim
      • 3 mths ago
      • Reported - view

      Dan Brock  That's what I think too. Let me try it and get back to you. Thanks!

      Reply Like
    • Fahim It's important to note that if you do this, your end users will not be able to perform any calculations, sum them in tables, or use these values as chart metrics--it would be for display only. Please be sure that is what you are looking to do.

      Reply Like
      • Fahim
      • Inmar
      • Fahim
      • 3 mths ago
      • Reported - view

      Dustin Basil Yeah, our end product is just to look like excel sheets. No graphs of anything. The user searches on the search bar and sees the values in rows and columns, that's it. Hopefully it will work. 

      Reply Like
    • Fahim Ok, so dates should be as easy as formatDate(SALES.SALES.TIME_ID, "MM-dd-yyyy") (or whatever you're looking to do). I'm working on a currency example now. Might be a bit challenging because we don't expose Java's number/currency APIs for that in our formula builder at the moment.

      Reply Like 1
  • How to convert "26/01/19" to date format. I used the format date ("MM/DD/YY"). It converted into (26/01/0019).

    I need an equivalent "RRRR" current century. Any help?

    Reply Like
  • Gautham, Are you loading data from flat file? 

    If you are, make sure you specify correct date format for the table in schema as shown below in the attached screenshot.

    In this example date was stored as "26/01/19" in the flat file and format specified in the table in Incorta is shown below.

     

    In the dashboard, you can use following to show date with format "dd/MM/yy":

    formatDate(

        date(

            date.date.date

        ),

        "dd/MM/yy"

    )

    Reply Like
Like Follow
  • 1 mth agoLast active
  • 9Replies
  • 190Views
  • 7 Following