Hi Friends,
Is it possible in NAV to enter data in date field as '11-Dec-14' format?
To avoid confusion among users about date format - 'dd-mm-yy' or 'mm-dd-yy' - is it possible in NAV enter date as 11-Dec-14?
I tried both in Classic as well RTC - not accepting.
Can anyone confirm this how NAV works?
Thanks
Murugan
0
Comments
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
But you could use the calender in RTC of course.
Or use day of the week plus weeknumber. Like m12 for mondag week 12.
Tino Ruijs
Microsoft Dynamics NAV specialist
Thanks for the quick response.
Yes. That was the first thing I did. Please see the screenshot attached.
My Windows system date - 18-Dec-14
NAV Status bar date - 18-12-13
See the error below when I entered '11-Dec-14' in date field.
Microsoft Dynamics NAV Classic
'11-Dec-14' is not a valid date.
OK
I know these alternatives. But for the data entry users prefers to use this format to avoid any confusion.
Murugan
follow http://moxie4nav.wordpress.com/2014/12/ ... ate-value/
cheers
you'll need following code in function MakeDateText in codeunit 1 to convert your given date (e.g. 15-MAR-11) into a valid date value:
MakeDateText(VAR DateText : Text[250]) : Integer
// additional local variables
// mPos | Integer
// monthText | Text | 10
// monthValue | Integer
// Text Constant: Text022 | JAN,FEB,MAR,APR,MAY,JUN,JUL,AUG,SEP,OCT,NOV,DEC
Position := 1;
Length := STRLEN(DateText);
ReadCharacter(' ',DateText,Position,Length);
// begin changes
DateText := CONVERTSTR(DateText,'-',',');
monthText := SELECTSTR(2,DateText);
mPos := STRPOS(Text022,monthText);
IF mPos > 0 THEN BEGIN
monthValue := (mPos + 3) / 4;
monthText := PADSTR('',2 - STRLEN(FORMAT(monthValue)),'0') + FORMAT(monthValue);
DateText := SELECTSTR(1,DateText) + '-' + monthText + '-' + SELECTSTR(3,DateText);
END ELSE
DateText := CONVERTSTR(DateText,',','-');
// end changes
IF NOT FindText(PartOfText,DateText,Position,Length) THEN
...
cheers