Need more, need help now?
- - - - - - - - - - - - - - - - - - pay-as-you-go support - no contract - tenth of an hour billing - expert help - fast service - no call queues
Need integration?
- - - - - - - - - - - - - - - - - - with your shipping system - website - invoicing system - crm - cms - manufacturing - order import - back to back orders..
Need a report?
- - - - - - - - - - - - - - - - - - Excel reporting that pulls data from Sage - custom layouts - layouts that change adapt to your brands and/or for drop shipping.
Want web hosting?
- - - - - - - - - - - - - - - - - - Your own domain name - email - a shop - wordpress - woo commerce - ticket systems - help desks - forums - portals

Removing Time stamp from Email Filenames

Report design issues and solutions.
Post Reply
pauljj
User
User
Posts: 48
Joined: 11 Sep 2014, 11:38
Sage Version: v2018 24 UK/Europe/Africa

Removing Time stamp from Email Filenames

Post by pauljj » 05 Feb 2018, 12:11

Hi Bruce,

I am emailing a GDN note in PDF format and have customised the filename thus

"DN-" + GDN_ITEM.GDN_NUMBER + "-" + SALES_ORDER.NAME + "-" + GDN_ITEM.DATE

this works fine until i go to my outlook and see that the filename date portion includes the date as dd_MM_yyyy and has also included a time portion (see attached)
In the report itself, i have formatted the GDN.ITEM,DATE field as short date dd MM yy , i have tried removing the time portion completely and tried different settings just to see if it has any effect, which it doesn't, so i'm thinking it's some system setting somewhere ?

I would like the filename to include the date in short format if possible with no time included ?
Thanks
Pauljj
PDF EXAMPLE.JPG
Login to access the files attached to this post.

pauljj
User
User
Posts: 48
Joined: 11 Sep 2014, 11:38
Sage Version: v2018 24 UK/Europe/Africa

Re: Removing Time stamp from Email Filenames

Post by pauljj » 05 Feb 2018, 12:19

to add - would it be something like this ?

DateTimeToFormattedString(date,format)

i need to be looking at ?

pauljj
User
User
Posts: 48
Joined: 11 Sep 2014, 11:38
Sage Version: v2018 24 UK/Europe/Africa

Re: Removing Time stamp from Email Filenames

Post by pauljj » 05 Feb 2018, 12:43

Think i'm on the right track now

"DN-" + GDN_ITEM.GDN_NUMBER + "-" + SALES_ORDER.NAME + "-" + DateTimeToFormattedString(GDN_ITEM.DATE, "ddMMyy")

has gotten rid of the time portion, the separators came out a little differently so " /" were replaced with underscores, for me this isn't an issue to remove separators completely as our file system works well without them.

does this look like I've followed the correct process?

User avatar
brucedenney
Site Admin
Site Admin
Posts: 4619
Joined: 28 Feb 2006, 09:56
Sage Version: v28 UK/Europe/Africa

Re: Removing Time stamp from Email Filenames

Post by brucedenney » 05 Feb 2018, 13:00

Sounds like it, sometimes when you build these strings you need to convert and format with formatstring eg

formatstring("{0:f2}",SALES_LEDGER.BALANCE)

Formating string appears to follow the convention for c# so... these should be a guide, the help file isn't that good. Slashes in filenames represent subdirectories, so you do not want to use them normally. They are also escape characters so in places where you do want to use them, like paths for images you need to double them up eg \\ so it knows you literally want a \ rather than to modify the next character.

http://www.csharp-examples.net/string-format-datetime/
http://www.csharp-examples.net/string-format-double/
http://www.csharp-examples.net/string-format-int/
For just about anything Sage :- Discount subscriptions, pay-as-you-go support, application integration, reports, layouts, linked excel spreadsheets, analysis or any other help making life with sage easier/less time consuming Contact me.

User avatar
brucedenney
Site Admin
Site Admin
Posts: 4619
Joined: 28 Feb 2006, 09:56
Sage Version: v28 UK/Europe/Africa

Re: Removing Time stamp from Email Filenames

Post by brucedenney » 05 Feb 2018, 13:06

P.S.

If you want to make filenames easy to find by Date use the ISO date format YYYYMMDD this when sorted alphabetically also sorts chronologically, you may have noticed sage adopted this convention for backup file names.
For just about anything Sage :- Discount subscriptions, pay-as-you-go support, application integration, reports, layouts, linked excel spreadsheets, analysis or any other help making life with sage easier/less time consuming Contact me.

Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests