Export Sales Data file name in invalid format

The default name when using Export Sales Data is in invalid format.

That’s a Windows setting that you can change to a more appropriate format. My default Short Date format is yyyy-MM-dd.

@QMcKay

Thanks for your input.

I know its changeable, but I thought as default sambapos should create a valid file name rather than a non-valid file name.

Seems silly, but the filename is based on local system short date. Because we use / in our dates it becomes an invalid filename. It was designed around multi language setups.

I get your point @Isaac, and you are correct… Programmatically, this sort of thing could be caught and modified in the code, to replace / with nothing, or space, or dash, in the same way that the time is being modified to remove the colon : since it too would produce an invalid filename.

That said, standard date format should be yyyy-MM-dd (in that order) anywhere and everywhere… the forward slash / should not be used. Times should also be represented in 24-hour format, not in AM/PM format. :wink:

As per ISO 8601

From: http://xkcd.com/1179/

1 Like

@Isaac. Thank you for reporting the issue. I’ve corrected it by replacing / with _ .

@QMcKay I’m a fan of standardization too however this is a very specific topic that needs to be thought from the user side. Best date format is the one user easily understands. However I couldn’t used local date formats on some places such as date filter inputs. Date inputs uses dd mm yyyy format to be able to auto complete dates. For example if user only enters 5 we assume 5th. day of current month. If enters 5 4 it means 5th. day of April and so on. If we support local date formats there that does not work fine for year first formats. User needs to type full date even they just meant to input x day of current month.

We can agree to disagree. :wink: Here’s another very good reason to standardize… :smile:

Yes your screenshot clearly shows the issue. I completely agree using a standard date format is better. However I can’t change current implementation because I know some people uses these files to integrate SambaPOS to other systems and such change may break their implementation. So changing system date format to yyyy-MM-dd is a great solution.

Sorry @emre… I wasn’t suggesting you change the code at all, I’m just joking around and poking fun at those who insist on doing things the wrong way :smile:. Certainly, keep the implementation the way it is, to use System Short Date format as set by the user.

However, it took me years to convince my wife that she was using the wrong format, which is why she could never find anything on her computer. :wink:

No don’t be sorry. I know you are not trying to change current implementation. You’ve just convinced me so nice and I quickly started thinking if I should change it or not :slight_smile: Wrote that while thinking about it lol.