Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all
i have two table (Table_voucheritem , Table_Taghvim) that relationed together
with VoucherDate.in data model view , two tables have relation together ,
but due to different format (date) they can't join together correctly.
i want they join together until when i click on VoucherDate's listbox ,
find Equivalent and show persian_date.
Instead of using date field to join two table
use numeric value of Date to join table.
Hi Mohammad,
You have the key field VoucherDate formatted differently in your tables. When loading the table Table_voucheritem, format VoucherDate like
Date(Floor(Timestamp(VoucherDate,'DD/MM/YYYY hh:mm:ss')),'DD.MM.YYYY') as VoucherDate
Good luck
Andrew
Covert both the Dates with same format
Table_voucheritem:
LOAD Credit, Debit, GacSubsidiaryAccountRef, date(floor(VoucherDate)) as VoucherDate
FROM Table_VoucherItem.qvd (qvd);
Table_Taghvim:
LOAD QV_DATE_NUM,
date(floor(GREGORIAN_DATE)) as VoucherDate,
PERSIAN_DATE, Year_Shamsi, Month_Shamsi, Day_Shamsi
FROM Miladi2Shamsi.xlsx (ooxml, embedded labels, table is persian_date);
Dear Andrew , Thanks a lot... , That worked
Instead of using date field to join two table
use numeric value of Date to join table.
HI Mohammad,
Glad to have been of help!
Andrew
Dear Kushal
your script doesn't work ,
however thank you for your help...
Hi Mohammad,
If your satisfied that you have a solution please mark the correct answer.
Kind regards
Andrew
Dear Andrew
i have this syntax:
----------------------------------------------
SQL
SELECT
Year
,Month
,GacBranchRef
,GacSecondDetailAccountRef
,GacFourthDetailAccountRef
,sum(Credit) - sum(Debit) as mandeh
, Date(Floor(Timestamp(item.VoucherDate,'DD/MM/YYYY hh:mm:ss')),'DD.MM.YYYY') as VoucherDate
FROM
----------------------------------------------
when i run script , don't identify Timestamp function in that (because sql haven't Timestamp function)
what must i to do?