(Java 1.14) Can I use tildes in command blocks?

I'm trying to run a block command like

/fill ~ ~ ~ ~15 ~15 ~15 minecraft:gravel 1 replace minecraft:air

and it's not filling anything. Do they accept tildes?

Edit: tileData and replaceDataValue only exist in Bedrock, so that's why it wasn't working.


You're passing too many arguments to the command. /fill takes a maximum of 9, but you entered 10. Remove the 8th argument and then it should work. (Also note that the last argument is able to accept NBT tag arguments, but should also work with normal material types.)

And yes, /fill does accept tildes.