Ecrion Software Inc. Homepage
Forum Home Forum Home > Data Architect > Generic Support
  New Posts New Posts RSS Feed: Converting string date
  FAQ FAQ  Forum Search   Register Register  Login Login

Converting string date

 Post Reply Post Reply
Author
Message / View First Unread Post
justinw View Drop Down
Admin Group
Admin Group
Avatar

Joined: 08 Dec 2011
Posts: 157
Post Options Post Options   Quote justinw Quote  Post ReplyReply Direct Link To This Post Topic: Converting string date
    Posted: 31 May 2012 at 10:15am
Question:  I need help formatting a date in string format to date-time format in the Data Architect.  How is this accomplished?

Answer:  This can be accomplished by using a combination of accepted formats and an available function within the Data Architect.  

1.  The supported date time formats are the following: datePartForMat timePartForMat

·         datePartForMat:

o   d/M/yyyy

o   dd/M/yyyy

o   d/MM/yyyy

o   dd/MM/yyyy

o   d-M-yyyy

o   dd-M-yyyy

o   d-MM-yyyy

o   dd-MM-yyyy

o   and reversed (eg: yyyy/MM/dd, yyyy-M-dd, etc)

·         timePartForMat

o   hh:mm:ss 

 

An option would be to use a “Convert to Date” function block inside the DAX (from All Functions – Conversion – to datetime). 

This function block has 2 input parameters:

·         Input – you can use a constant of type “string” as input and pass the value from your application in the desired format

·         Format – here you can use a constant string for formatting purposes. Note that the format string and the input string must match

See the sample diagram below.



 

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Bulletin Board Software by Web Wiz Forums® version 9.69
Copyright ©2001-2010 Web Wiz

This page was generated in 0.063 seconds.