Export date where year has 4 digits

PEzechiels
Member Posts: 83
Hi,
Does anyone know how to export a date field where the year consists of 4 digits?
thnx
Does anyone know how to export a date field where the year consists of 4 digits?
thnx
0
Comments
-
Hi
Have you tried:
FORMAT(TODAY,0,'<Day,2>-<Month,2>-<Year4>');
which will return the date format DD-MM-YYYY.
Regards
Claus0 -
ClausHamann wrote:Hi
Have you tried:
FORMAT(TODAY,0,'<Day,2>-<Month,2>-<Year4>');
which will return the date format DD-MM-YYYY.
Regards
Clauskind of fell into this...0 -
The C\Side Ref Guide has some good examples under
Format not FORMAT
Date: Day,Month,Month Text,Quarter,Year,Year4,Week, Week Year,Week Year4,Weekday,Weekday Text,Closing
for Example
<Closing><Month,2>/<Day,2>/<Year>
0
04/05/03
<Closing><Month,2>/<Day,2>/<Year>
1
04/05/03
<Month,2><Day,2><Year><Closing>D
2
040503D
<Closing><Year>/<Month,2>/<Day,2>
3
03/04/05
<Month Text> <Closing><Day>, <Year4>
4
April 5, 2003
<Closing><Month,2><Day,2><Year>
5
040503
<Closing><Year><Month,2><Day,2>
6
0305040 -
Savatage wrote:The C\Side Ref Guide has some good examples under
Format not FORMAT
Thanks. I had looked at both Format and FORMAT. When reading about Format, it said it applied to textboxes and dataport fields. I am writing to a text file from a report, so I couldn't figure out what the syntax was supposed to be to call the Custom Format for a global variable in a processing report. I couldn't get anything I tried to make up to compile. what can i say? i'm far from being a developer (but getting a little closer each day, thanks to MIBUSO!).
Claus' snippet of code made me realize that i was overthinking it. FORMAT(daterec,0,'<custom formula>'); makes sense, although i honestly do not know what the 0 parameter is. I included it in my use and got the results i want, but would love to know what it actually does for me.
thanks!kind of fell into this...0 -
The parameter is for length. Read the C/SIDE reference guide (under the Help menu) and search for FORMAT, it will be explained there. I know it does, because it is right there
> to the right of my browser window.0 -
String := FORMAT(Value [, Length] [, FormatNumber | FormatString])
Equals zero (0)
The system will return the entire value (default)
.
.
.
I just think of it as it being the Standard Format that will appear0 -
DenSter wrote:The parameter is for length. Read the C/SIDE reference guide (under the Help menu) and search for FORMAT, it will be explained there. I know it does, because it is right there
> to the right of my browser window.
I have not used this parameter when I used FORMAT in the past. I just used FORMAT(whatever);
I learn one new thing today and relearn an old thing - this time, properly! Thanks again.kind of fell into this...0 -
I Use it to give me unique doc numbers for a vendor credit dataport
VenNo := "Account No.";
MonthName := FORMAT(TODAY,0,'<Month Text,3><Year>');
"Document No." := VenNo+'-'+MonthName;
Result :
ABC111-DEC06
ABC222-DEC06
ABC333-DEC06
& yes we only do it once a month.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