Stopped Working Dates All wrong

I have had this working fine but now it has no idea about the calculations on dates

Hi {site: text; selector=.bold}
Thank you for reaching out about your delivery and can we thank you for your purchase.
Please, allow us to explain the shipping process so you have a better understanding.
Any order that we receive before noon get processed that day.
If it is after noon, then it moves to the following business day (Mon to Fri are business days).

You order date was received by us at {formdate: HH:MM DD/MM/YYYY; name=date} we have one business day for process.
{hour={time: H; at={=date}; pattern=HH:MM DD/MM/YYYY}}
{=hour}
We need {=1+(1 if hour >= 12 else 0)} business day

Please note the date provided by eBay is an approximate date.
The correct dispatch and delivery are per the products listings shipping tab.
Shipping is in business days as 95% of couriers do not work weekends.
The shipping days for this item as per the listing is {formmenu: 3; default=4; 5; 7; 8; 10; 14; 21; name=weekdays} business days.

So, you should expect to receive it on {time: ddd Do MMM YYYY; shift=+{=weekdays}D(skip=SAT,SUN)}, but you need to appreciate strike action has an impact on supply routes and couriers.
Hope this helps explain and clarify shipping on you order and thank you again.
As, soon as we dispatch the item(s) we will update your eBay purchase area with a tracking number.

When i open it i get this https://i.imgur.com/XTjtOwS.png

If you go back from today it fails, see below it should show 7 Oct ???

formdate currently doesn't allow you to select a time, just a date.
What are you trying to achieve with {hour={time: H; at={=date}; pattern=HH:MM DD/MM/YYYY}} ?
Why not also add an hour selector (as a dropdown) ?

HI Dan
I think i asked this before but i might have not worded it correctly, because one of you guys help me do this.
But the logic is if a customer makes an order before 12 noon then that day of the order is counted as handling day. If it is after 12 noon then it becomes the next business day.
In short if after 12 noon add a +2 onto the delivery date if before noon a +1.
you may have a far better way to deal with it in TB but thats the logic.
If you neeed any more details please ask away.

Hi @Thorrrr,

{note: trim=yes}{formdate: DD/MM/YYYY; name=date}{formmenu: name=hour; values={=seq(0, 23)}}
{process=2 if hour >= 12 else 1}
{endnote}Hi {site: text; selector=.bold}
Thank you for reaching out about your delivery and can we thank you for your purchase.
Please, allow us to explain the shipping process so you have a better understanding.
Any order that we receive before noon get processed that day.
If it is after noon, then it moves to the following business day (Mon to Fri are business days).

You order date was received by us at {time: hA DD/MM/YYYY; at={={=hour} & " 0 " & {=date}}; pattern=H m DD/MM/YYYY} we have {=("2 business days" if process > 1 else "1 business day")} for process.

Please note the date provided by eBay is an approximate date.
The correct dispatch and delivery are per the products listings shipping tab.
Shipping is in business days as 95% of couriers do not work weekends.
The shipping days for this item as per the listing is {formmenu: 3; default=4; 5; 7; 8; 10; 14; 21; name=weekdays} business days.
So, you should expect to receive it on {time: ddd Do MMM YYYY; shift=+{=weekdays+process}D(skip=SAT,SUN); at={=date}; pattern=DD/MM/YYYY}, but you need to appreciate strike action has an impact on supply routes and couriers.
Hope this helps explain and clarify shipping on you order and thank you again.
As, soon as we dispatch the item(s) we will update your eBay purchase area with a tracking number.

As Dan mentioned {formdate} command does not allow you select time, just a date. Therefore I added a dropdown which you can use to select an hour. Depending on selected value it will add 1 (before 12 noon) or 2 (after 12 noon) to the expected delivery date.

I also added at option to the last time command to depend on selected date.

Please let us know if there are any other problems

HI Mansur

Sorry this is not correct the processing day is always 1 business day.
I only mention if its after 12noon it goes to next day for 1 processing day
What i meant is when calculating delivery date if before noon its +1 on top of shipping days if after 12 noon add +2. This is only for calculation not for dispaly
Hope this helps

That simplifies the snippet.

{note: trim=yes}{formdate: DD/MM/YYYY; name=date}{formmenu: name=hour; values={=seq(0, 23)}}
{process=2 if hour >= 12 else 1}
{endnote}Hi {site: text; selector=.bold}
Thank you for reaching out about your delivery and can we thank you for your purchase.
Please, allow us to explain the shipping process so you have a better understanding.
Any order that we receive before noon get processed that day.
If it is after noon, then it moves to the following business day (Mon to Fri are business days).

You order date was received by us at {time: hA DD/MM/YYYY; at={={=hour} & " 0 " & {=date}}; pattern=H m DD/MM/YYYY} we have 1 business day for process.

Please note the date provided by eBay is an approximate date.
The correct dispatch and delivery are per the products listings shipping tab.
Shipping is in business days as 95% of couriers do not work weekends.
The shipping days for this item as per the listing is {formmenu: 3; default=4; 5; 7; 8; 10; 14; 21; name=weekdays} business days.
So, you should expect to receive it on {time: ddd Do MMM YYYY; shift=+{=weekdays+process}D(skip=SAT,SUN); at={=date}; pattern=DD/MM/YYYY}, but you need to appreciate strike action has an impact on supply routes and couriers.
Hope this helps explain and clarify shipping on you order and thank you again.
As, soon as we dispatch the item(s) we will update your eBay purchase area with a tracking number.

You have it 99% there the only issue is if before 12 noon you count that day.
So as you can see from the image that should read Thu 6th Oct

image

Here are the steps to calculate the result:

  1. You've selected 11 which is below 12, therefore 1 business day to process.
  2. You've selected 3 business days for shipping.
  3. In total we should add 4 business days to the date that was selected by formdate which is 03/10/2022

Final date is 07/10/2022.

Am I missing something? I don't understand why it should be 06/10/2022. In that case we add 3 days instead of 4.

Hi
So to explain see sheet

image

I changed the snippet to add 1 (after 12 noon) and 0 (before 12 noon). Should align with the table you've shared.

{note: trim=yes}{formdate: DD/MM/YYYY; name=date}{formmenu: name=hour; values={=seq(0, 23)}}
{process=1 if hour >= 12 else 0}
{endnote}Hi {site: text; selector=.bold}
Thank you for reaching out about your delivery and can we thank you for your purchase.
Please, allow us to explain the shipping process so you have a better understanding.
Any order that we receive before noon get processed that day.
If it is after noon, then it moves to the following business day (Mon to Fri are business days).

You order date was received by us at {time: hA DD/MM/YYYY; at={={=hour} & " 0 " & {=date}}; pattern=H m DD/MM/YYYY} we have 1 business day for process.

Please note the date provided by eBay is an approximate date.
The correct dispatch and delivery are per the products listings shipping tab.
Shipping is in business days as 95% of couriers do not work weekends.
The shipping days for this item as per the listing is {formmenu: 3; default=4; 5; 7; 8; 10; 14; 21; name=weekdays} business days.
So, you should expect to receive it on {time: ddd Do MMM YYYY; shift=+{=weekdays+process}D(skip=SAT,SUN); at={=date}; pattern=DD/MM/YYYY}, but you need to appreciate strike action has an impact on supply routes and couriers.
Hope this helps explain and clarify shipping on you order and thank you again.
As, soon as we dispatch the item(s) we will update your eBay purchase area with a tracking number.

1 Like