How to convert text data type to date data type?

Hello everyone, i created scenario where webhook get data ( only date time) , now google search rows should have to see if there any similar date time in google sheets and then google sheets update rows should have to change status of that date time.
Now the problem I am facing with is the webhooks get response no matter what getting not date data type even if it’s only (YYYY-MM-DD HH:MM) - this kind of message, so that is why google sheets search rows couldnt find any relatable date time form google sheets, so that is why google sheets update rows dont know where that row number.
So i need to convert my text data type into date data type. below you can see my scenario , please if anyone knows how to handle this problem please help, i would be grateful .



Welcome to the Make community!

Looks like your variable named date is not actually of date type yet, but only a string.

Follow the Tokens to parse a date string – I’m not sure what your date looks like.

e.g.: parseDate({{1.date}}; "format_goes_here")

Links

Here are some useful links and guides you can use to learn more on how to use the Make platform, apps, and app modules. I found these useful when I was learning Make, and hope they might benefit you too —

General

Help Center Basics

3 Likes

Hey! @Ali2
In your case, you have used a webhook to fetch data that includes dates in the output. If possible, could you please explain how the dates are present in the webhook data?
The solution I provided below is just an example, and it specifically fetches dates from a Google Sheets document.

So as you mentioned above your problem i think to get date data type you have to use these steps:

1.Set date into your google sheets in this correct date time format.
Date

  1. As you can see the date time coming from our sheets like this.
    Date1

3.Use ‘format date’ to format your date coming from previous google sheet module like this -
Date 2

  1. After using format date function you’ll get correct date format shown below
    Final
3 Likes

hey brother, i found out that the problem is not in data type i guess , here you can see in photo below that the filter is working fine, but i can not understand why there is no output , even if google sheets contains that kind of information. Or am i wrong ?


@Ali2 Can you provide me with the output bundle ? for google sheets module

2 Likes

ok , A MINUTE PLEASE.


THERE IT IS

Also can you please share your google sheet search row module?

2 Likes

SURE AND



@Ali2 i think the date & time coming from your webhook isn’t matching the filter condition in your sheets module that’s why you are getting “0” bundle. Also can you please share your webhook output? data

2 Likes

sure there it is

@Ali2
The date & time coming from your webhook is “02/02/2024” & the date you have in your sheets in all 9 rows as i can see in the snapshot that you have uploaded is “31/01/2024” & the filters you added with “And” operator in your sheet doesn’t filter the data to next module because it is not equal else your date from webhook is same as in sheet then it will give that date & time in your sheet output bundle
Simply the date & time doesn’t match so the sheet module is giving you “0” or empty bundle.

2 Likes

NO, BROTHER IN MY GOOGLE SHEETS below i have that date 02/02/2024 , this cannot be the problem we are searching for, its 4 days left im tryna understand what the problem is :smiling_face_with_tear: :smiling_face_with_tear: :smiling_face_with_tear:

@Ali2 Use Time operator instead of date time operator
here

Screenshot 2024-01-31 200047

It will work.

2 Likes

brother, i didn’t helped, still the problem is the same :smiling_face_with_tear: :smiling_face_with_tear: :smiling_face_with_tear: , now i have no idea what to do, and im so grateful that you have tried to help me :black_heart: and i just realised that if i delete and filter where time is written it returns , but not the special one i need

Have you tried a text operator on the time filter? I mean I think the Google Sheet column looks like a text string (not a date value) so comparing them using a text operator “equals” I think may be more accurate.

3 Likes

Yep, I JUST checked if it’s gonna help, but unfortunately nothing changed :smiling_face_with_tear: