Updating price disc table to date, based on from date with and or without specific price group

I'm not very fond of the developer side of ax and writing jobs to update fields, but I'm trying to update PriceDiscTable.ToDate based on the PriceDiscTable.FromDate


I have:

static void DT_PriceDiscToDate(Args _args)
    PriceDiscTable  priceDiscTable;
    while select forUpdate priceDiscTable where priceDiscTable.FromDate = 21/07/2017
        priceDiscTable.ToDate = "31/12/2017";
I've tried the '," etc surrounding the from date, but as I said I'm not very fond of this area and keep getting a syntax error.
I also would like to expand on this and update the PriceDiscTable.ToDate based on the from date & a specific price group