Short date format in email templates - magento-1.8

We have a long date format in the transitional emails, such as "2015/12/01 00:00..." and I would like to show the date in a short format, like dd/mm/YYYY only. The email variable is:
{{var order.getCreatedAtFormated('long')}}
If I put "short" instead of "long", does it work?

Related

DOB field as date tab prompts date picker

I have a date field and it has to be a date field as I need to run formula on the field to identify is the person is over 18 or not. Formula field is to find if dob is 18 or over. And date formula's does not work on text field.
Now the issue is, because it is a date field, docusign prompts date picker and any date format I provide either through validation or by changing the regional setting does not change the date format. It is always 2021-06-24T12:00:00-04:00 (ie YYYY-MM-DDTHH24:MI:SS).
Date tab gets added using API and so are the validationPattern. Please can you help me with the following issues.
How can I stop the date picker from showing?
Even if the date picker shows up, how to control the date format. I am looking for mm/dd/yyyy
Regional settings, Time Zone does not have a Date format without timestamp. Inspite of picking something from there, date picker does not match what was picked.
Update, you can use formulateTab to calculate the date in 18 years like this:
AddYears( [Text <GUID>] , 18)
Note above is the unique ID of the text tab where the user enters their DOB.
Hope that helps.
Make it into a text field and you can then just use Date validation with one of the formats below: (make sure it works for you first from the web app - you can later do this all with the eSign API)

How to customize SOQL date format

When i select the data from salesforce using the SOQL, am getting the date format as 'YYYY-MM-DDThh:mm:ss-hh:mm' for a date column.
How cam we customize this date value to this format 'YYYY-MM-DD HH24:MI:SS' ?
You can't apply arbitrary formatting to date-time results in SOQL. By default, you'll receive the ISO8601 format shown in your question.
You may request a formatted date using the FORMAT() SOQL function. The result is
When the FORMAT function is applied these fields reflect the appropriate format for the given user locale. The field format matches what appears in the Salesforce Classic user interface. For example, the date December 28, 2015 can appear numerically as 2015-12-28, 28-12-2015, 28/12/2015, 12/28/2015, or 28.12.2015, depending on the org’s locale setting.
You cannot supply a locale or date format to this function. If you need a format other than the user locale, perform this transformation in your client application.

Acumatica Report Writer extract date from date time field

In Acumatica advanced report writer i have a date parameter but when i print this it shows in DD/MM/YYYY HH:MM:SS format. What is the format syntax so it only shows the date in DD/MM/YYYY format?
Thanks
Use the report designer format field:
Date format syntax is from .Net Framework:
custom date and time format strings
If you need a hardcoded format (with slashes) use 'dd/MM/yyyy'.
If you only want the short date format (date without time) use 'd'.
I would pick 'd' format if all you want is to remove time because it will follow the culture and still provide a short date.
Example: 'MM-dd-yyyy' or 'dd/MM/yyyy' etc...

Figuring Excel date format programmatically

I have a program that gets input in the form of an excel which it reads by querying (select * into a dataset).
The excel is created by the customer.
The excel contains a date column.
The problem is, that when looking into the dataset, the date column format is sometimes like mm/dd/yyyy and sometimes dd/mm/yyyy. (1/25/1970) (25/1/1970)
I guess it depends on the locale on the machine which the excel was made.
How can my program know what is the date format in the excel?
Not sure whether your question is about output or input...
For output:
You did not mention the database type. But the rule is: make your dates the american way: mm/dd/yyyy. For Jet, I generally use Format(MyDate, ""\#dd\/mm\/yyyy\#"")
("\" is the escape character, it makes sure the next character is output "as is")
For input:
Try reading the cell format ? range("a1").NumberFormat
However on my PC, with French setup a date displayed as 15/2/2011 has a returned format = m/d/yyyy so little use here !

set date to iso format in sharepoint through the GUI

in sharepoint can i use calculated value on a date field to set the format of a date?
eg i want to set a date field to ISO format
You can do that with the TEXT() function in your calculated field, like this:
TEXT([NAMEOFYOURDATEFIELD],"yyyy-mm-dd")

Resources