Change Date format to YYYY/MM/DD

nav_student
Member Posts: 175
Hi guys,
i want to change the format of date to DD/MM/YYYY to YYYY/MM/DD.
How can i accomplish that?
Thanks for your help!
i want to change the format of date to DD/MM/YYYY to YYYY/MM/DD.
How can i accomplish that?
Thanks for your help!
0
Comments
-
It takes the Regianal Setting from your OS .
In Windows go to Control Panel --> Region and Language
Change the Format thereThanks and Regards
Rishi0 -
Hi Reinhard,
thanks for your reply. the codeFORMAT(dateValue,10,'<Year4>/<Month,2>/<Day,2>');
is not working.
If I try with "Year,4"FORMAT(dateValue,10,'<Year,4>/<Month,2>/<Day,2>');
the output is 0014/06/01 instead of 2014/06/01
i try to use this commands but isn't 100% accurate:datestring:=FORMAT("Posting Date",10,'<Day,2>/<Month,2>,<Year4>');
datestringresult:='_'+COPYSTR(datestring,7,10)+'/'+COPYSTR(datestring,4,2)+'/'+COPYSTR(datestring,1,2);
but if i put / symbol or - Excel will put the date with "DD/MM/YYYY" automatically.
How can i solve this?0 -
You can try to format your date with the following: FORMAT(TODAY,0,'<Year4>/<Month,2>/<Day,2>')0
-
Hi Tony,
i already do this but Excel converts into DD/MM/YYYY.
Can i setup the Excel Buffer to work with this format YYYY/MM/DD?
Best Regards0 -
Hello sir,
It is working for me
(But I don't use Year,4 I'm using Year4)
When you say it's not working, can you be more specific?
You mention that Excel is reformatting your date. That is true, Excel will do that. You can change the formatting in Excel.
To get an idea of how to do that, you can search the forum for topics related to it.
http://www.mibuso.com/forum/viewtopic.p ... 91&start=0
Also, the trick is, open Excel, then "record a new macro" and then format everything how you want it.
Next, go ahead and edit the macro. It will show you the code to format everything how you want it.
Now, you can replicate the same code in NAV.
In this case, you should just go ahead and export the date value without formatting it. Then, tell excel to:NumberFormat = "yyyy/mm/dd"
hth
- Reinhard0 -
Use the NumberFormat field to control how Excel displays dates.
The value of the field is copied to Excel's cell property NumberFormat.
Number Format Codes may give you some idea of the codes available. Or use Google to find more info how to set this property. It is easier to find it there than in Excel's own help.0 -
ExcelBuffer.NumberFormat:='yyyy-mm-dd;@';
also try this codeExcelBuffer.NumberFormat:='yyyy-mm-dd';
with thisExcelRowData[5] := FORMAT("Posting Date",10,'<Year4>/<Month,2>/<Day,2>');
and the Excel value gives me 05/06/20130 -
NewDateText := FORMAT("Posting Date",0,'<Year4>/<Month,2>/<Day,2>');
Works fine for me too. I don't know how it's returning the value 05/06/2013.
Play around with it, review the results, try quotes in front if excel is dividing the #'s:
''''+FORMAT("Posting Date",0,'<Year4>/<Month,2>/<Day,2>');0 -
I sorted it by doing this:
ExcelRowData[5] := FORMAT("Posting Date",11,'<Year4>/<Month,2>/<Day,2>');
0 -
[Posts from topic http://www.mibuso.com/forum/viewtopic.php?t=62159 have been merged into this topic]Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions