First, make a DINT array of 7 registers, Define a tag like, PLC_TIME as a DINT[7].
Then use: GSV WALLCLOCKTIME ? LocalDateTime PLC_TIME[0]
The ? can be left blank in the actual instruction. The parameter "LocalDateTime" can be several things, as shown, LocalDateTime retrieves the local time, with time zone and DST offsets applied. Other options are "DateTime" which returns GMT time, "CurrentValue", which returns microseconds from 0000 Jan 1, 1970 in UTC to a Long integer value, and a few more depending on the revision of the firmware.
Then you get back (For LocalDateTime or DateTime):
PLC_TIME[0] - Year (4 digit)
PLC_TIME[1] - Month
PLC_TIME[2] - Day of Month
PLC_TIME[3] - Hours
PLC_TIME[4] - Minutes
PLC_TIME[5] - Seconds
PLC_TIME[6] - Microseconds
Rather then query the RTC every scan, I normally either get my system time in a periodic task, or triggered off of a 100 to 500ms timer.