How to change format mask of date picker while printing with Apex Office Print? - datepicker

In APEX I have a date picker with format mask: DD-MON-YYYY HH24:MI
But when I print my report with AOP it looks something like: 2020-04-15T11:02:00.000000Z
How can I change this?
Thank You

Date data is stored in the database in a date format, the APEX format mask is just that - a mask.
I guess this really depends how you're running your report, but I would suggest using to_char() in your SQL that you feed to AOP.
to_char(date_field, 'DD-MON-YYYY HH24:MI') "template_alias"

Related

Date formatting in postgresql from existing data

I've date in dd-mm-yyyy format, I need the date in yyyy-mm(month) format. I'm using postgresql.
Thanks in advance.
date values don't have any format. Any formatting you see is applied by your SQL client. To turn a date into a string with a specific format, you can use to_char()
to_char(the_column, 'yyyy-mm')

Date display in a drupal view

I would like to display a list of dates in a view, but the problem is that the dates are recorded in SQL format.
I would like to convert this date to my local date format, I'd have to be able to change the field data output format
How can I do this??
Thanks by advance
I found this solution :
I made modification in the "hook_field_formatter_view()" of my date-time field module.

Convert Date Value When Using Google Form Date Picker from 5 Digit Format to MM/dd/yyyy format

I selected tomorrow's date (8/21/2014) from the data picker field of a Google Form submission, and the value "41872" is returned in the spreadsheet.
What format is this date format?
I need to convert this date format to the MM/dd/yyyy format using script, as formatting the Date column using the Format menu only updates the rows that are currently available...not the new rows that will be there when new form submissions come in.
How do I make this conversion?
I am not sure, but your issue seems to be very basic. Its about the cell formatting as like we do in Ms Excel.
For Google spreadsheet inorder to format a cell or a range,
1. Select the Range
2. On menu, Go To Format->Number->Date (and then select the required format)
Does this works?
I had the same confusion. All you need to do is just change the format from the menu Format->Number->Date & Time

PHPExcel expects date format d/m/y, but m/d/y entered. How to set PHPExcel Reader object to use custom date format for conversions

I need to read an excel spreadsheet with date format m/d/y into database. However, PHPExcel is outputting the wrong date because it thinks the date format is d/m/y.
How can I tell PHPExcel reader object to use the format m/d/y?
If the date is simply a string in the excel file, then you can use the standard PHP functions for string to date conversion (either strtotime() or DateTime objects). If the date is stored as an Excel timestamp, then you can use the PHPExcel built-in functions (PHPExcel_Shared_Date::ExcelToPHP() or PHPExcel_Shared_Date::ExcelToPHPObject()) to convert from the Excel timestamp value to a PHP/Unix timestamp or DateTime object, and then use the standard PHP date functions or DateTime methods to format it however you wish.
For clarity if other people encounter this problem:
Spreadsheet contains date 02/04/2014
You/Client/Boss entered date to be: m/d/y or February 4th, 2014
PHPExcel sees it as: d/m/y or April 2nd, 2014
The solution is to avoid the situation altogether by using the correct date formatting when the spreadsheet is created or use general formatting instead.
Q) What do I do if my client provided the spreadsheet to me?
A) Search for an entire day for a solution until you come to the same conclusion as I did or you can save yourself time and ask the client to send you another spreadsheet with the correct formatting.

Jasper Report Date Format

In Jasper Reoprt, crosstab, I have displayed my date as like "2012-09-13". Is there a way to display it in reverse as "13-09-2012" using any String methods? And another thing is that I retrieve the date from SQL dB.
Thanks in advance!
You can do the above in the query level itself instead of doing it on ireport.
You may want to refer to the below link on how to format dates
format date
In ireport, you can use SimpleDateFormat/DateFormat and format your dates as you require
You can refer the link