How to customize SOQL date format - python-3.x

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.

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)

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...

Excel 2010 Convert text string to Full date & 24 hr time

Program: Excel 2010
Issue: External report gives me a text string, I want to convert it to Date & 24 hour time.
141221205535 needs to be:
14/12/21 20:55:35
I have tried text to columns making the result show: YMD
I have then tried using the format cells option: (custom) yy/mm/dd hh:mm:ss
* I receive a string of ######## in the Sample field in the formatting box.
I have tried also just using the date/time version, no seconds
1412212055 needs to be:
14/12/21 20:55
ideally, if possible:
20141421 2055 or 2014/14/21 20:55 I will accept
I can not alter the report as it comes through a 3rd party and I am pulling the date from a 'reference' field. The report, when downloaded, is in CSV and there is no existing formatting on the data.
I need to convert this as my sales report then needs to be sorted by date order.
Note: If I do use the seconds in the string, I get the weird looking scientific number. So i've had to reduce the digits, this isn't ideal, is there a way to avoid the scientific number whilst the process of changing 'text to date' is happening?
Thanks in advance.
I used this formula to convert:
=TEXT(A1,"2000-00-00 00\:00\:00")+0
format result cell in required format, e.g. yyyy/mm/dd hh:mm:ss
If you don't want the seconds in the underlying value you can use this version
=TEXT(LEFT(A1,10),"2000-00-00 00\:00")+0
These formulas work because TEXT function converts your value 141221205535 to a text value 2014-12-21 20:55:35, then, because that is a valid date/time format in Excel the +0 "co-erces" the text value to a serial number representing the correct date/time in Excel.....so you can then simply format the result to display any way you want.
Note that I'm assuming all dates will be in the current (21st) century.....
A formula like this would work -
=TEXT(DATE(LEFT(A1,2),MID(A1,3,2),MID(A1,5,2))+TIME(MID(A1,7,2),MID(A1,9,2),MID(A1,11,2)),"yy/mm/dd hh:mm:ss")
If your format always has 12 digits
You'll need to add the datevalue with the timevalue to get also the HMS
for example (suppose the text is in D5 cell):
=DATEVALUE(LEFT(D5,2)&"-"&MID(D5,3,2)&-MID(D5,5,2))+TIMEVALUE(MID(D5,7,2)&":"&MID(D5,9,2)&":"&RIGHT(D5,2))`

When i import the date format in excel(dd/mm/yyyy) to msaccess it is showing non date value

When I am importing the excel file in date format(dd/mm/yyyy) to access it is showing non date value what is the problem.
eg:27/3/2012 to 33765 here 33765 is a non date value
The reason is because all dates within the MS Office world are actually numeric values, e.g the date you gave above 27/03/2012 equates to 40995.
When using the import wizard to create a new table, Access will automatically read this as it's true numeric value and set the column type as so.
Fortunately it's easy to fix, open up the design view of your table, amend the column in question to a date format and save the table, this should now present all the values correctly.
Alternatively, setup a blank table with the column already set to the date data type and then import your spreadsheet into the existing table.
Access by default thinks that dates coming from Excel are in American date format (mm/dd/yyyy) not European (dd/mm/yyyy).
The number you are seeing is how excel is storing the dates. (every day since 1/1/1990 is +1).
When the dates are in european format Access doesnt recognize them as dates during import and may load their raw serial date numbers.
Additionally be sure that the Access column that these are importing to is set as 'date'. I figured that you may have already done that, but I wanted to check.

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