Hi folks,
Im trying to figure out how to display all dates in certain reports ( just reports relating to our Irish site) in the following format dd-mmm-yy...but im new to navision and haven't a clue. I found a post saying to use something like the following:
textVariable := format(datefield,10,'<day,3>/<month,2>/<year>');
..problem is i don't even know where to type that!!
Can anyone give me the idiot proof answer to this question??
Thanks y'all,
triona*
0
Comments
There are some standard ways of formatting the the date field. I would recommend searching the c/side reference guide with the key word "FORMAT".
This gives a very good explanation of how to use the format command for different data types including the DATE.
As for where to type it.....
Depends on how you want to use it ???? there are many options.
Hope that points you in the right direction.
Dean.
im gonna take a look at that reference guide now....
what i was trying to figure out is, for a particular text box on say, the Sales Invoice report..when i go into the properties of the text box, can i type something directly into the Format field to change the date format just for that text box...dont want to change the format of the date field in the actual table where the date is stored....hope that makes some kind of sense :roll:
triona*
Yep, makes perfect sense, done this with customers before
Lets use an example where the "location Code" on the sales header is used to define the Date format.
Lets assume there are 2 Location Codes
DMY (Day Month Year)
YMD (Year Month Day)
Create a new text variable:
MyNewText Type=Text Length =250
so your code would be something like:
From the help file you will see that format 3 changes the date layout to be YMD(Year Month Date) and format 0 is the default date layout.
The way in which I would deal with this for my customers would be to create a new field on the Customer Card that specifies the format to be used. You can then get this each time you create a new sales order and transfer it at that point.
Dean
Open report in designer. Chose menu View / Sections. Select a field where your date is shown. Open properties window for this filed and enter following in Format property:
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
triona*