DateTimeUniversal (PQL)
Returns a date in format yyyy-mm-dd hh:mm
- Returned Output: Text
- Library: PQL \ Common \ Formats
- Version: 2020.10.000
- Compatibility:
- Can be combined with and other PQL function throughout the application.
- It CANNOT be used with MDX or VBA functions. But it can be used on MDX-based content in other parts of the application.
Syntax
DateFormat( <Date-Time> , "YYYY-MM-dd hh:mm" )
* Click on the function's arguments above for more details on the input values.
Comments
- The predefined format is a short cut to using the standard DATEFORMAT function.
- The format mask provided can be easily changed to create alternative date-time formats, as described here. You can also see the process of editing masks by comparing this function to the others in the listing.
- Make sure to note the use of the double quotes and the use of upper and lower case characters in the mask design. They are all relevant.
Different Function types
- Use the Format function to format numbers.
- This function is like the Excel Format function.
Examples
This example returns the string "2020-06-14 21:18"
DateFormat( DateTime(), "YYYY-MM-dd hh:mm" )