Jump to content
  • 0

Bring Date of EVENT from one table to another..... Stumped


RobStach
 Share

Question

Hi All!

So, something has me stumped.

Here's the scenario:  One of my tables contains a list of Events and another table contains a list of Customers who purchased tickets to those events.

My EVENTS table contains Event location, Event SKU, and date of each event. Each location can have multipe dates.

Customers purchase tickets to those events and a SKU is listed in the purchase (not the event date - which isn't ideal) however; the SKU has the last  6 digits as the date (example: XXX090921)

 

Bottom line, I want the EVENT DATE (from the EVENTS table) to be entered indo the CUSTOMERS table based on the SKU that gets imported from WOO. I cannot seem to find a way to do this.

 

Thoughts?????

Thanks in advance!!!

 

Rob

 

 

 

 

 

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 1

Is this right?

image.png.b4df9d1efc3e1b97ce2de088827018a0.png

Here's my Formula Field
 

CONVERT(DATE,

(
LEFT(RIGHT([@field:SKU],6),2) +'/' +

LEFT(RIGHT([@field:SKU],4),2) +'/' +

'20'+RIGHT([@field:SKU],2)

),101)

RIGHT Function gets the RIGHT part of the text with specified length( RIGHT(Field, length))

LEFT function is to get the left part of the text, once I got the 6 ending characters, I took the 2 leftmost ones to get the month, then add '/'

Then I took the 4 RIGHT characters, and took the 2 leftmost ones again, that will be the day, then add '/'

then '20' concatenated by the 2 rightmost digits (to get 2021)

Then convert it all to date, 101 is code for converting text into date format and vice versa, you can omit the conversion if you don't need to.

Link to comment
Share on other sites

  • 0
44 minutes ago, RobStach said:

Hi All!

So, something has me stumped.

Here's the scenario:  One of my tables contains a list of Events and another table contains a list of Customers who purchased tickets to those events.

My EVENTS table contains Event location, Event SKU, and date of each event. Each location can have multipe dates.

Customers purchase tickets to those events and a SKU is listed in the purchase (not the event date - which isn't ideal) however; the SKU has the last  6 digits as the date (example: XXX090921)

 

Bottom line, I want the EVENT DATE (from the EVENTS table) to be entered indo the CUSTOMERS table based on the SKU that gets imported from WOO. I cannot seem to find a way to do this.

 

Thoughts?????

Thanks in advance!!!

 

Rob

 

 

 

 

 

so basically, each date (if you have multiple one based on location) has different SKU, right? Most probably, your SKU is correct, you can use Scheduled Task to transfer the dates from Events Table to Customer Table based on the SKU, Or, you can also use Formula Field.

In your case your SKU has XXX090921, you can take the 09 then concatenate a '/' then take the next two and concatenate '/' again, then concatenate '20' to the 21, and then convert all these to Date

Link to comment
Share on other sites

  • 0
1 hour ago, TellMeWhy said:

so basically, each date (if you have multiple one based on location) has different SKU, right? Most probably, your SKU is correct, you can use Scheduled Task to transfer the dates from Events Table to Customer Table based on the SKU, Or, you can also use Formula Field.

In your case your SKU has XXX090921, you can take the 09 then concatenate a '/' then take the next two and concatenate '/' again, then concatenate '20' to the 21, and then convert all these to Date

Ohhhhhhhhhhhhhh!!! This is a brilliant method. I need to get my head wrapped around both concepts and give them a try. 

 

THANK YOU!!

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...